Module: PuppetDBQuery::Logging
- Defined in:
- lib/puppetdb_query/logging.rb
Overview
for logger access just include this module
Class Attribute Summary collapse
Class Method Summary collapse
-
.included(base) ⇒ Object
addition.
Instance Method Summary collapse
Class Attribute Details
.logger ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/puppetdb_query/logging.rb', line 9 def logger unless @logger @logger = Logger.new($stdout) @logger.level = (ENV['LOG_LEVEL'] || Logger::DEBUG).to_i end @logger end |
Class Method Details
.included(base) ⇒ Object
addition
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/puppetdb_query/logging.rb', line 19 def self.included(base) # rubocop:disable Lint/NestedMethodDefinition class << base def logger # :nocov: Logging.logger # :nocov: end def logger=(logger) # :nocov: Logging.logger = logger # :nocov: end end # rubocop:enable Lint/NestedMethodDefinition end |