use logger.info

Imo running `--lsi` should use `Jekyll.logger.info`, so it can be made `--quiet`.
This commit is contained in:
Joel Meyer-Hamme 2017-01-26 16:02:08 +00:00 committed by GitHub
parent e56d809298
commit 4b19e93f09
1 changed files with 3 additions and 9 deletions

View File

@ -26,15 +26,15 @@ module Jekyll
def build_index def build_index
self.class.lsi ||= begin self.class.lsi ||= begin
lsi = ClassifierReborn::LSI.new(:auto_rebuild => false) lsi = ClassifierReborn::LSI.new(:auto_rebuild => false)
display("Populating LSI...") Jekyll.logger.info("Populating LSI...")
site.posts.docs.each do |x| site.posts.docs.each do |x|
lsi.add_item(x) lsi.add_item(x)
end end
display("Rebuilding index...") Jekyll.logger.info("Rebuilding index...")
lsi.build_index lsi.build_index
display("") Jekyll.logger.info("")
lsi lsi
end end
end end
@ -46,11 +46,5 @@ module Jekyll
def most_recent_posts def most_recent_posts
@most_recent_posts ||= (site.posts.docs.reverse - [post]).first(10) @most_recent_posts ||= (site.posts.docs.reverse - [post]).first(10)
end end
def display(output)
$stdout.print("\n")
$stdout.print(Jekyll.logger.formatted_topic(output))
$stdout.flush
end
end end
end end