Class: Riddl::CommonLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby/riddl/commonlogger.rb

Instance Method Summary collapse

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