Module: Console::Interface
- Included in:
- Console
- Defined in:
- lib/console/interface.rb
Overview
The public logger interface.
Instance Method Summary collapse
-
#call ⇒ Object
Emit a log message with arbitrary arguments and options.
-
#debug ⇒ Object
Emit a debug log message.
-
#error ⇒ Object
Emit an error log message.
-
#fatal ⇒ Object
Emit a fatal log message.
-
#info ⇒ Object
Emit an informational log message.
-
#logger ⇒ Object
Get the current logger instance.
-
#logger=(instance) ⇒ Object
Set the current logger instance.
-
#warn ⇒ Object
Emit a warning log message.
Instance Method Details
#call ⇒ Object
Emit a log message with arbitrary arguments and options.
49 50 51 |
# File 'lib/console/interface.rb', line 49 def call(...) Logger.instance.call(...) end |
#debug ⇒ Object
Emit a debug log message.
24 25 26 |
# File 'lib/console/interface.rb', line 24 def debug(...) Logger.instance.debug(...) end |
#error ⇒ Object
Emit an error log message.
39 40 41 |
# File 'lib/console/interface.rb', line 39 def error(...) Logger.instance.error(...) end |
#fatal ⇒ Object
Emit a fatal log message.
44 45 46 |
# File 'lib/console/interface.rb', line 44 def fatal(...) Logger.instance.fatal(...) end |
#info ⇒ Object
Emit an informational log message.
29 30 31 |
# File 'lib/console/interface.rb', line 29 def info(...) Logger.instance.info(...) end |
#logger ⇒ Object
Get the current logger instance.
12 13 14 |
# File 'lib/console/interface.rb', line 12 def logger Logger.instance end |
#logger=(instance) ⇒ Object
Set the current logger instance.
The current logger instance is assigned per-fiber.
19 20 21 |
# File 'lib/console/interface.rb', line 19 def logger= instance Logger.instance= instance end |
#warn ⇒ Object
Emit a warning log message.
34 35 36 |
# File 'lib/console/interface.rb', line 34 def warn(...) Logger.instance.warn(...) end |