Module: Logging
- Included in:
- Checkoff::Attachments, Checkoff::Events, Checkoff::Internal::AsanaEventEnrichment, Checkoff::Internal::AsanaEventFilter, Checkoff::Projects, Checkoff::Sections, Checkoff::SelectorClasses::FunctionEvaluator, Checkoff::TaskSearches, Checkoff::Tasks, Checkoff::Timing
- Defined in:
- lib/checkoff/internal/logging.rb
Overview
include this to add ability to log at different levels
Instance Method Summary collapse
- #debug(message = nil, &block) ⇒ void
- #error(message = nil, &block) ⇒ void
- #finer(message = nil, &block) ⇒ void
- #info(message = nil, &block) ⇒ void
-
#logger ⇒ ::Logger
@sg-ignore.
- #warn(message = nil, &block) ⇒ void
Instance Method Details
#debug(message = nil, &block) ⇒ void
This method returns an undefined value.
46 47 48 |
# File 'lib/checkoff/internal/logging.rb', line 46 def debug( = nil, &block) logger.debug(, &block) end |
#error(message = nil, &block) ⇒ void
This method returns an undefined value.
25 26 27 |
# File 'lib/checkoff/internal/logging.rb', line 25 def error( = nil, &block) logger.error(, &block) end |
#finer(message = nil, &block) ⇒ void
This method returns an undefined value.
53 54 55 56 57 |
# File 'lib/checkoff/internal/logging.rb', line 53 def finer( = nil, &block) # No such level by default # # logger.finer(message, &block) end |
#info(message = nil, &block) ⇒ void
This method returns an undefined value.
39 40 41 |
# File 'lib/checkoff/internal/logging.rb', line 39 def info( = nil, &block) logger.info(, &block) end |
#logger ⇒ ::Logger
@sg-ignore
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/checkoff/internal/logging.rb', line 10 def logger # @type [::Logger] # @sg-ignore @logger ||= if defined?(Rails) && Rails.respond_to?(:logger) && Rails.logger # @sg-ignore # @type [::Logger] Rails.logger else ::Logger.new($stdout, level: log_level) end end |
#warn(message = nil, &block) ⇒ void
This method returns an undefined value.
32 33 34 |
# File 'lib/checkoff/internal/logging.rb', line 32 def warn( = nil, &block) logger.warn(, &block) end |