Module: Logging
- Included in:
- Checkoff::Attachments, Checkoff::Internal::AsanaEventFilter, 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
- #warn(message = nil, &block) ⇒ void
Instance Method Details
#debug(message = nil, &block) ⇒ void
This method returns an undefined value.
42 43 44 |
# File 'lib/checkoff/internal/logging.rb', line 42 def debug( = nil, &block) logger.debug(, &block) end |
#error(message = nil, &block) ⇒ void
This method returns an undefined value.
21 22 23 |
# File 'lib/checkoff/internal/logging.rb', line 21 def error( = nil, &block) logger.error(, &block) end |
#finer(message = nil, &block) ⇒ void
This method returns an undefined value.
49 50 51 52 53 |
# File 'lib/checkoff/internal/logging.rb', line 49 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.
35 36 37 |
# File 'lib/checkoff/internal/logging.rb', line 35 def info( = nil, &block) logger.info(, &block) end |
#logger ⇒ ::Logger
8 9 10 11 12 13 14 15 16 |
# File 'lib/checkoff/internal/logging.rb', line 8 def logger # @sg-ignore @logger ||= if defined?(Rails) && Rails.respond_to?(:logger) && Rails.logger # @sg-ignore Rails.logger else ::Logger.new($stdout, level: log_level) end end |
#warn(message = nil, &block) ⇒ void
This method returns an undefined value.
28 29 30 |
# File 'lib/checkoff/internal/logging.rb', line 28 def warn( = nil, &block) logger.warn(, &block) end |