Class: Demopass::Logger
- Inherits:
-
Object
- Object
- Demopass::Logger
- Defined in:
- lib/demopass/logger.rb
Instance Method Summary collapse
- #debug(message) ⇒ Object
- #info(message) ⇒ Object
-
#initialize(log_level: nil) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(log_level: nil) ⇒ Logger
Returns a new instance of Logger.
4 5 6 7 8 9 |
# File 'lib/demopass/logger.rb', line 4 def initialize(log_level: nil) log_level ||= env_log_level || rails_log_level || default_log_level return if log_level == :none @logger = ::Logger.new($stdout, level: log_level, progname: "Demopass") end |
Instance Method Details
#debug(message) ⇒ Object
11 12 13 |
# File 'lib/demopass/logger.rb', line 11 def debug() log(, log_level: ::Logger::DEBUG) end |
#info(message) ⇒ Object
15 16 17 |
# File 'lib/demopass/logger.rb', line 15 def info() log(, log_level: ::Logger::INFO) end |