Class: ElasticLogger::DiskWriter
- Inherits:
-
Object
- Object
- ElasticLogger::DiskWriter
- Defined in:
- lib/elastic-logger/disk_writer.rb
Instance Method Summary collapse
-
#initialize(name:, config:) ⇒ DiskWriter
constructor
A new instance of DiskWriter.
- #log(severity, hash) ⇒ Object
Constructor Details
#initialize(name:, config:) ⇒ DiskWriter
Returns a new instance of DiskWriter.
3 4 5 6 |
# File 'lib/elastic-logger/disk_writer.rb', line 3 def initialize(name:, config:) @config = config @name = name end |
Instance Method Details
#log(severity, hash) ⇒ Object
8 9 10 |
# File 'lib/elastic-logger/disk_writer.rb', line 8 def log(severity, hash) logger.send(severity, build_log(hash)) end |