Class: Fractor::Workflow::StructuredLogger
- Inherits:
-
WorkflowLogger
- Object
- WorkflowLogger
- Fractor::Workflow::StructuredLogger
- Defined in:
- lib/fractor/workflow/structured_logger.rb
Overview
Structured logger that outputs JSON-formatted logs. Useful for log aggregation systems like ELK, Splunk, CloudWatch, etc.
Instance Attribute Summary
Attributes inherited from WorkflowLogger
Instance Method Summary collapse
-
#initialize(logger: nil, correlation_id: nil, format: :json) ⇒ StructuredLogger
constructor
A new instance of StructuredLogger.
Methods inherited from WorkflowLogger
#child, #debug, #error, #info, #warn
Constructor Details
#initialize(logger: nil, correlation_id: nil, format: :json) ⇒ StructuredLogger
Returns a new instance of StructuredLogger.
11 12 13 14 |
# File 'lib/fractor/workflow/structured_logger.rb', line 11 def initialize(logger: nil, correlation_id: nil, format: :json) super(logger: logger, correlation_id: correlation_id) @format = format end |