Module: Cosmo::Logger
- Extended by:
- Forwardable
- Defined in:
- lib/cosmo/logger.rb,
sig/cosmo/logger.rbs
Defined Under Namespace
Modules: Context Classes: BaseFormatter, Instance, SimpleFormatter
Constant Summary collapse
- TRACE =
Below DEBUG; opt in with COSMO_LOG_LEVEL=trace for high-frequency polling/loop noise
-1 # Below DEBUG; opt in with COSMO_LOG_LEVEL=trace for high-frequency polling/loop noise
Class Method Summary collapse
- .debug ⇒ void
- .error ⇒ void
- .fatal ⇒ void
- .info ⇒ void
- .instance ⇒ Object
- .instance=(logger) ⇒ Object
- .trace ⇒ void
- .warn ⇒ void
- .with ⇒ void
- .without ⇒ nil
Class Method Details
.debug ⇒ void
This method returns an undefined value.
35 |
# File 'sig/cosmo/logger.rbs', line 35
def self.debug: (::String | Exception) -> void
|
.error ⇒ void
This method returns an undefined value.
33 |
# File 'sig/cosmo/logger.rbs', line 33
def self.error: (::String | Exception) -> void
|
.fatal ⇒ void
This method returns an undefined value.
39 |
# File 'sig/cosmo/logger.rbs', line 39
def self.fatal: (::String) -> void
|
.info ⇒ void
This method returns an undefined value.
31 |
# File 'sig/cosmo/logger.rbs', line 31
def self.info: (::String) -> void
|
.instance ⇒ Object
75 76 77 78 79 80 |
# File 'lib/cosmo/logger.rb', line 75 def self.instance @instance ||= Instance.new($stdout).tap do |logger| logger.formatter = SimpleFormatter.new logger.level = coerce_level(ENV.fetch("COSMO_LOG_LEVEL", "info")) end end |
.instance=(logger) ⇒ Object
87 88 89 |
# File 'lib/cosmo/logger.rb', line 87 def self.instance=(logger) @instance = logger end |
.trace ⇒ void
This method returns an undefined value.
41 |
# File 'sig/cosmo/logger.rbs', line 41
def self.trace: (::String | Exception) -> void
|
.warn ⇒ void
This method returns an undefined value.
37 |
# File 'sig/cosmo/logger.rbs', line 37
def self.warn: (::String) -> void
|