Class: CheckerJobs::Notifiers::Logger
- Includes:
- FormatterHelpers
- Defined in:
- lib/checker_jobs/notifiers/logger.rb
Constant Summary
Constants included from FormatterHelpers
FormatterHelpers::GITHUB_URL_FORMAT
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(check, count, _entries) ⇒ Logger
constructor
A new instance of Logger.
- #notify ⇒ Object
Methods included from FormatterHelpers
#format_entry, #human_check_name, #repository_url
Constructor Details
#initialize(check, count, _entries) ⇒ Logger
Returns a new instance of Logger.
6 7 8 9 10 11 12 13 14 |
# File 'lib/checker_jobs/notifiers/logger.rb', line 6 def initialize(check, count, _entries) super @count = count raise CheckerJobs::InvalidNotifierOptions unless valid? @logger = Logger.new(logdev) @logger.level = level end |
Class Method Details
.default_options ⇒ Object
20 21 22 23 24 25 |
# File 'lib/checker_jobs/notifiers/logger.rb', line 20 def self. { logdev: $stdout, level: Logger::INFO, } end |
Instance Method Details
#notify ⇒ Object
16 17 18 |
# File 'lib/checker_jobs/notifiers/logger.rb', line 16 def notify @logger.add(level, format, human_check_name) end |