Class: MysqlAlterMonitoring::JsonLogger
- Inherits:
-
Object
- Object
- MysqlAlterMonitoring::JsonLogger
- Defined in:
- lib/mysql_alter_monitoring/json_logger.rb
Overview
MysqlAlterMonitoring::JsonLogger
Instance Method Summary collapse
Constructor Details
#initialize(io) ⇒ void
16 17 18 |
# File 'lib/mysql_alter_monitoring/json_logger.rb', line 16 def initialize(io) @logger = ::Logger.new(io, formatter: FORMATTER) end |
Instance Method Details
#error(error, hash = {}) ⇒ void
This method returns an undefined value.
29 30 31 32 33 |
# File 'lib/mysql_alter_monitoring/json_logger.rb', line 29 def error(error, hash = {}) hash.merge(error_class: error.class.name, error_message: error.) .then { (_1) } .then { logger.error(_1) } end |
#info(hash) ⇒ void
This method returns an undefined value.
22 23 24 |
# File 'lib/mysql_alter_monitoring/json_logger.rb', line 22 def info(hash) (hash).then { logger.info(_1) } end |