Class: Amazon::Coral::SimpleLogFactory
- Inherits:
-
LogFactory
- Object
- LogFactory
- Amazon::Coral::SimpleLogFactory
- Defined in:
- lib/amazon/coral/simplelog.rb
Overview
Provides a LogFactory implementation that supplies WrappedLogger objects to requestors. The key provided to getLog is prepended to log messages from each Logger.
- Copyright
-
Copyright © 2008 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Instance Method Summary collapse
- #getLog(key) ⇒ Object
-
#initialize(output, level) ⇒ SimpleLogFactory
constructor
A new instance of SimpleLogFactory.
Methods inherited from LogFactory
Constructor Details
#initialize(output, level) ⇒ SimpleLogFactory
Returns a new instance of SimpleLogFactory.
62 63 64 65 |
# File 'lib/amazon/coral/simplelog.rb', line 62 def initialize(output, level) @output = output @level = level end |
Instance Method Details
#getLog(key) ⇒ Object
67 68 69 70 71 72 |
# File 'lib/amazon/coral/simplelog.rb', line 67 def getLog(key) logger = Logger.new(@output) logger.level = @level return WrappedLogger.new(key, logger) end |