Class: Dnsruby::TheLog
- Inherits:
-
Object
- Object
- Dnsruby::TheLog
- Defined in:
- lib/dnsruby/the_log.rb
Overview
This class exists for backwards compatibility.
It’s Logger (which defaults to STDOUT, level FATAL) can be configured, or a new Logger can be supplied.
Dnsruby::TheLog.level=Logger::DEBUG
Dnsruby::TheLog.debug("Debug message")
Class Method Summary collapse
-
.method_missing(symbol, *args) ⇒ Object
:nodoc: all.
Instance Method Summary collapse
- #level ⇒ Object
-
#level=(level) ⇒ Object
Change the Logger level.
-
#set_logger(logger) ⇒ Object
Set a new Logger for use by Dnsruby.
Class Method Details
.method_missing(symbol, *args) ⇒ Object
:nodoc: all
40 41 42 |
# File 'lib/dnsruby/the_log.rb', line 40 def self.method_missing(symbol, *args) #:nodoc: all Dnsruby.log.send(symbol, *args) end |
Instance Method Details
#level ⇒ Object
36 37 38 |
# File 'lib/dnsruby/the_log.rb', line 36 def level return Dnsruby.log.level end |
#level=(level) ⇒ Object
Change the Logger level.
33 34 35 |
# File 'lib/dnsruby/the_log.rb', line 33 def level=(level) Dnsruby.log.level = level end |
#set_logger(logger) ⇒ Object
Set a new Logger for use by Dnsruby
29 30 31 |
# File 'lib/dnsruby/the_log.rb', line 29 def set_logger(logger) Dnsruby.log = logger end |