Module: Signalwire::Logger
- Included in:
- Blade::Connection, Relay::Calling::Call, Relay::Calling::Component, Relay::Calling::Instance, Relay::Client, Relay::Consumer, Relay::Messaging::Instance
- Defined in:
- lib/signalwire/logger.rb
Class Method Summary collapse
-
.logger ⇒ Logger
A global logger object.
Instance Method Summary collapse
Class Method Details
.logger ⇒ Logger
A global logger object
10 11 12 13 14 15 16 |
# File 'lib/signalwire/logger.rb', line 10 def logger @logger ||= begin logger = ::Logger.new(STDERR, progname: 'SignalWire', level: ::Logger::DEBUG) logger.level = ENV.fetch('SIGNALWIRE_LOG_LEVEL', ::Logger::INFO) logger end end |
Instance Method Details
#level=(level) ⇒ Object
23 24 25 |
# File 'lib/signalwire/logger.rb', line 23 def level=(level) Signalwire::Logger.logger.level = level end |
#logger ⇒ Object
19 20 21 |
# File 'lib/signalwire/logger.rb', line 19 def logger Signalwire::Logger.logger end |