Class: Fractor::Workflow::StructuredLogger

Inherits:
WorkflowLogger show all
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

#correlation_id, #logger

Instance Method Summary collapse

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