diff --git a/Gemfile b/Gemfile index 5230b7d..710b52f 100644 --- a/Gemfile +++ b/Gemfile @@ -48,6 +48,8 @@ gem 'octicons' gem 'kaminari' gem 'has_scope' +gem 'logging' + # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.1.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 3278ee9..9e7f69e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -166,6 +166,10 @@ GEM rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) + little-plugger (1.1.4) + logging (2.2.2) + little-plugger (~> 1.1) + multi_json (~> 1.10) loofah (2.2.2) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -363,6 +367,7 @@ DEPENDENCIES launchy letter_opener_web listen (>= 3.0.5, < 3.2) + logging mysql2 (>= 0.4.4, < 0.6.0) naught octicons diff --git a/lib/tasks/checks.rake b/lib/tasks/checks.rake index 9eb409a..a4ffaf6 100644 --- a/lib/tasks/checks.rake +++ b/lib/tasks/checks.rake @@ -7,17 +7,21 @@ namespace :checks do desc "Refresh domains expiry dates" task domain: :environment do + logger = Logging.logger(STDOUT) + logger.level = :warn configuration = Rails.configuration.chexpire.fetch("checks_domain") - process = CheckDomainProcessor.new(configuration: configuration) + process = CheckDomainProcessor.new(logger: logger, configuration: configuration) process.sync_dates end desc "Refresh SSL expiry dates" task ssl: :environment do + logger = Logging.logger(STDOUT) + logger.level = :warn configuration = Rails.configuration.chexpire.fetch("checks_ssl") - process = CheckSSLProcessor.new(configuration: configuration) + process = CheckSSLProcessor.new(logger: logger, configuration: configuration) process.sync_dates end end