Module: Mosquitto::Logging
- Included in:
- Client
- Defined in:
- lib/mosquitto/logging.rb
Constant Summary collapse
- LOG_LEVELS =
{ Mosquitto::LOG_ERR => Logger::FATAL, Mosquitto::LOG_ERR => Logger::ERROR, Mosquitto::LOG_WARNING => Logger::WARN, Mosquitto::LOG_INFO => Logger::INFO, Mosquitto::LOG_DEBUG => Logger::DEBUG }
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
-
#log(message, severity = Logger::DEBUG) ⇒ Object
Pipe debug messages through an already assigned logger instance.
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
12 13 14 |
# File 'lib/mosquitto/logging.rb', line 12 def logger @logger end |
Instance Method Details
#log(message, severity = Logger::DEBUG) ⇒ Object
Pipe debug messages through an already assigned logger instance.
42 43 44 |
# File 'lib/mosquitto/logging.rb', line 42 def log(, severity = Logger::DEBUG) logger.add(severity, .to_s, "MQTT") if logger end |