From e3321976601c8ba41c008659a4020affa27c3335 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 28 Jun 2014 17:19:40 -0400 Subject: [PATCH] Be quiet very quickly. Fixes #2520. --- lib/jekyll/configuration.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 797873f9..6f5cbc15 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -40,6 +40,7 @@ module Jekyll 'markdown_ext' => 'markdown,mkdown,mkdn,mkd,md', 'textile_ext' => 'textile', + 'quiet' => false, 'port' => '4000', 'host' => '0.0.0.0', @@ -103,6 +104,10 @@ module Jekyll override['source'] || self['source'] || DEFAULTS['source'] end + def quiet?(override = {}) + override['quiet'] || self['quiet'] || DEFAULTS['quiet'] + end + def safe_load_file(filename) case File.extname(filename) when '.toml' @@ -120,6 +125,9 @@ module Jekyll # # Returns an Array of config files def config_files(override) + # Be quiet quickly. + Jekyll.logger.log_level = :error if quiet?(override) + # Get configuration from /_config.yml or / config_files = override.delete('config') if config_files.to_s.empty?