Module: Cosmo::Logger
- Extended by:
- Forwardable
- Defined in:
- lib/cosmo/logger.rb,
sig/cosmo/logger.rbs
Defined Under Namespace
Modules: Context
Classes: BaseFormatter, SimpleFormatter
Class Method Summary
collapse
Class Method Details
.debug ⇒ void
This method returns an undefined value.
27
|
# File 'sig/cosmo/logger.rbs', line 27
def self.debug: (::String | Exception) -> void
|
.error ⇒ void
This method returns an undefined value.
25
|
# File 'sig/cosmo/logger.rbs', line 25
def self.error: (::String | Exception) -> void
|
.fatal ⇒ void
This method returns an undefined value.
31
|
# File 'sig/cosmo/logger.rbs', line 31
def self.fatal: (::String) -> void
|
.info ⇒ void
This method returns an undefined value.
23
|
# File 'sig/cosmo/logger.rbs', line 23
def self.info: (::String) -> void
|
.instance ⇒ Object
62
63
64
65
66
67
|
# File 'lib/cosmo/logger.rb', line 62
def self.instance
@instance ||= ::Logger.new($stdout).tap do |logger|
logger.formatter = SimpleFormatter.new
logger.level = ::Logger::Severity.coerce(ENV.fetch("COSMO_LOG_LEVEL", "info"))
end
end
|
.instance=(logger) ⇒ Object
69
70
71
|
# File 'lib/cosmo/logger.rb', line 69
def self.instance=(logger)
@instance = logger
end
|
.warn ⇒ void
This method returns an undefined value.
29
|
# File 'sig/cosmo/logger.rbs', line 29
def self.warn: (::String) -> void
|
.with ⇒ void
This method returns an undefined value.
54
55
56
|
# File 'lib/cosmo/logger.rb', line 54
def self.with(...)
Context.with(...)
end
|
.without ⇒ nil
58
59
60
|
# File 'lib/cosmo/logger.rb', line 58
def self.without(...)
Context.without(...)
end
|