Class: Temporal::Workflow::ReplayAwareLogger
- Inherits:
-
Object
- Object
- Temporal::Workflow::ReplayAwareLogger
- Defined in:
- lib/temporal/workflow/replay_aware_logger.rb
Constant Summary collapse
- SEVERITIES =
%i[debug info warn error fatal unknown].freeze
Instance Attribute Summary collapse
-
#replay ⇒ Object
writeonly
Sets the attribute replay.
Instance Method Summary collapse
-
#initialize(main_logger, replay = true) ⇒ ReplayAwareLogger
constructor
A new instance of ReplayAwareLogger.
- #log(severity, message, data = {}) ⇒ Object
Constructor Details
#initialize(main_logger, replay = true) ⇒ ReplayAwareLogger
Returns a new instance of ReplayAwareLogger.
8 9 10 11 |
# File 'lib/temporal/workflow/replay_aware_logger.rb', line 8 def initialize(main_logger, replay = true) @main_logger = main_logger @replay = replay end |
Instance Attribute Details
#replay=(value) ⇒ Object (writeonly)
Sets the attribute replay
6 7 8 |
# File 'lib/temporal/workflow/replay_aware_logger.rb', line 6 def replay=(value) @replay = value end |
Instance Method Details
#log(severity, message, data = {}) ⇒ Object
21 22 23 24 25 |
# File 'lib/temporal/workflow/replay_aware_logger.rb', line 21 def log(severity, , data = {}) return if replay? main_logger.log(severity, , data) end |