Class: Riddl::CommonLogger
- Inherits:
-
Object
- Object
- Riddl::CommonLogger
- Defined in:
- lib/ruby/riddl/commonlogger.rb
Instance Method Summary collapse
-
#initialize(appname = "Riddl Server", logger = $stdout) ⇒ CommonLogger
constructor
A new instance of CommonLogger.
- #write(it) ⇒ Object
Constructor Details
#initialize(appname = "Riddl Server", logger = $stdout) ⇒ CommonLogger
Returns a new instance of CommonLogger.
6 7 8 9 |
# File 'lib/ruby/riddl/commonlogger.rb', line 6 def initialize(appname="Riddl Server",logger=$stdout) @logger = Logger.new(logger) @appname = appname end |
Instance Method Details
#write(it) ⇒ Object
11 12 13 |
# File 'lib/ruby/riddl/commonlogger.rb', line 11 def write(it) @logger << @appname + ': ' + it end |