Class: Chronos::Internal::SafeLogger
- Inherits:
-
Object
- Object
- Chronos::Internal::SafeLogger
- Defined in:
- lib/chronos/internal/safe_logger.rb
Overview
Protects the host application from logger failures and recursive diagnostics.
Constant Summary collapse
- MAX_MESSAGE_BYTES =
1024
Instance Method Summary collapse
- #debug(message) ⇒ Object
-
#initialize(logger) ⇒ SafeLogger
constructor
A new instance of SafeLogger.
- #warn(message) ⇒ Object
Constructor Details
#initialize(logger) ⇒ SafeLogger
Returns a new instance of SafeLogger.
15 16 17 18 19 |
# File 'lib/chronos/internal/safe_logger.rb', line 15 def initialize(logger) @logger = logger @mutex = Mutex.new @logging = false end |
Instance Method Details
#debug(message) ⇒ Object
21 22 23 |
# File 'lib/chronos/internal/safe_logger.rb', line 21 def debug() write(:debug, ) end |
#warn(message) ⇒ Object
25 26 27 |
# File 'lib/chronos/internal/safe_logger.rb', line 25 def warn() write(:warn, ) end |