Class: Hoodoo::Logger::Payload
- Inherits:
-
Object
- Object
- Hoodoo::Logger::Payload
- Defined in:
- lib/hoodoo/logger/logger.rb
Overview
Used internally toommunicate details of a log message across the Hoodoo::Communicators::Pool mechanism and through to a log writer. Log writer authors do not need to use this class; Hoodoo::Logger::WriterMixin unpacks it and calls your subclass’s #report implementation with individual parameters for you.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Code - see Hoodoo::Logger#report.
-
#component ⇒ Object
readonly
Component - see Hoodoo::Logger#report.
-
#data ⇒ Object
readonly
Data - see Hoodoo::Logger#report.
-
#log_level ⇒ Object
readonly
Log level - see Hoodoo::Logger#report.
Instance Method Summary collapse
-
#initialize(log_level:, component:, code:, data:) ⇒ Payload
constructor
Create an instance.
Constructor Details
#initialize(log_level:, component:, code:, data:) ⇒ Payload
Create an instance. Named parameters are:
log_level
-
See Hoodoo::Logger#report.
component
-
See Hoodoo::Logger#report.
code
-
See Hoodoo::Logger#report.
data
-
See Hoodoo::Logger#report.
345 346 347 348 349 350 |
# File 'lib/hoodoo/logger/logger.rb', line 345 def initialize( log_level:, component:, code:, data: ) @log_level = log_level @component = component @code = code @data = data end |
Instance Attribute Details
#code ⇒ Object (readonly)
Code - see Hoodoo::Logger#report.
332 333 334 |
# File 'lib/hoodoo/logger/logger.rb', line 332 def code @code end |
#component ⇒ Object (readonly)
Component - see Hoodoo::Logger#report.
328 329 330 |
# File 'lib/hoodoo/logger/logger.rb', line 328 def component @component end |
#data ⇒ Object (readonly)
Data - see Hoodoo::Logger#report.
336 337 338 |
# File 'lib/hoodoo/logger/logger.rb', line 336 def data @data end |
#log_level ⇒ Object (readonly)
Log level - see Hoodoo::Logger#report.
324 325 326 |
# File 'lib/hoodoo/logger/logger.rb', line 324 def log_level @log_level end |