Class: Triglav::Agent::Logger
- Inherits:
-
ServerEngine::DaemonLogger
- Object
- ServerEngine::DaemonLogger
- Triglav::Agent::Logger
- Defined in:
- lib/triglav/agent/logger.rb
Overview
Logger class
require 'triglav/agent/logger'
logger = Logger.new('STDOUT', opts = {})
Instance Method Summary collapse
-
#initialize(logdev, *args) ⇒ Logger
constructor
A new instance of Logger.
- #write(msg) ⇒ Object
Constructor Details
#initialize(logdev, *args) ⇒ Logger
Returns a new instance of Logger
9 10 11 12 13 14 |
# File 'lib/triglav/agent/logger.rb', line 9 def initialize(logdev, *args) logdev = STDOUT if logdev == 'STDOUT' logdev = STDERR if logdev == 'STDERR' super(logdev, *args) @formatter = LogFormatter.new end |
Instance Method Details
#write(msg) ⇒ Object
16 17 18 |
# File 'lib/triglav/agent/logger.rb', line 16 def write(msg) @logdev.write msg end |