Module: Cisco::Logger
- Defined in:
- lib/util/logger.rb
Overview
Module for logging. Will use the Puppet logging module if available, otherwise will create a Logger to use
Constant Summary collapse
- @@logger =
rubocop:disable Style/ClassVars
Logger.new(STDOUT)
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.debug(string) ⇒ Object
58 59 60 |
# File 'lib/util/logger.rb', line 58 def debug(string) @@logger.debug(string) end |
.info(string) ⇒ Object
62 63 64 |
# File 'lib/util/logger.rb', line 62 def info(string) @@logger.info(string) end |
Instance Method Details
#error(string) ⇒ Object
30 31 32 |
# File 'lib/util/logger.rb', line 30 def error(string) @@logger.err(string) end |
#level ⇒ Object
41 42 43 |
# File 'lib/util/logger.rb', line 41 def level @@logger.level end |
#level=(level) ⇒ Object
45 46 47 |
# File 'lib/util/logger.rb', line 45 def level=(level) @@logger.level = level end |
#warn(string) ⇒ Object
34 35 36 |
# File 'lib/util/logger.rb', line 34 def warn(string) @@logger.warning(string) end |