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