Class: Syntropy::Logger
- Inherits:
-
Object
- Object
- Syntropy::Logger
- Defined in:
- lib/syntropy/logger.rb
Overview
The Logger class implements a logger with support for structured logging.
Instance Method Summary collapse
-
#error(o) ⇒ void
Logs an ERROR entry.
-
#info(o) ⇒ void
Logs an INFO entry.
-
#initialize(machine, fd = $stdout.fileno, **opts) ⇒ void
constructor
Initializes the logger.
-
#warn(o) ⇒ void
Logs an WARN entry.
Constructor Details
#initialize(machine, fd = $stdout.fileno, **opts) ⇒ void
Initializes the logger.
14 15 16 17 18 |
# File 'lib/syntropy/logger.rb', line 14 def initialize(machine, fd = $stdout.fileno, **opts) @machine = machine @fd = fd @opts = opts end |
Instance Method Details
#error(o) ⇒ void
This method returns an undefined value.
Logs an ERROR entry.
40 41 42 |
# File 'lib/syntropy/logger.rb', line 40 def error(o) call(:ERROR, o) end |
#info(o) ⇒ void
This method returns an undefined value.
Logs an INFO entry.
24 25 26 |
# File 'lib/syntropy/logger.rb', line 24 def info(o) call(:INFO, o) end |
#warn(o) ⇒ void
This method returns an undefined value.
Logs an WARN entry.
32 33 34 |
# File 'lib/syntropy/logger.rb', line 32 def warn(o) call(:WARN, o) end |