Class: Zapp::Logger
- Inherits:
-
Object
- Object
- Zapp::Logger
- Includes:
- Base
- Defined in:
- lib/zapp/logger.rb,
lib/zapp/logger/base.rb
Overview
The default logger for Zapp
Defined Under Namespace
Modules: Base
Constant Summary collapse
- GLOBAL_INSTANCE_KEY =
The hash key in Ractor.current that stores the global Zapp::Logger instance
"ZAPP_LOGGER_INSTANCE"
Constants included from Base
Base::FROZEN_ENV, Base::LEVELS, Base::OUT_IO_MUTEX_KEY
Instance Attribute Summary
Attributes included from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Logger
constructor
A new instance of Logger.
Methods included from Base
#debug, #error, #flush, #info, #log, #out=, #trace, #warn
Constructor Details
#initialize {|_self| ... } ⇒ Logger
Returns a new instance of Logger.
10 11 12 |
# File 'lib/zapp/logger.rb', line 10 def initialize yield(self) if block_given? end |
Class Method Details
.instance ⇒ Object
18 19 20 |
# File 'lib/zapp/logger.rb', line 18 def instance Ractor.current[GLOBAL_INSTANCE_KEY] ||= new end |