Parent

Heel::Logger

wrapper around the rack common logger to open up the file and flush the logs this is invoked with a ‘use’ command in the Builder so a new instance of ‘Logger’ in created with each request, so we do all the heavy lifting in the meta class.

Public Class Methods

log() click to toggle source
# File lib/heel/logger.rb, line 18
def log
  # the log can get closed if daemonized, the at_exit will close it.
  if @log.closed? then
    @log = File.open(@log_file, "a")
  end
  @log
end
log_file=(lf) click to toggle source
# File lib/heel/logger.rb, line 26
def log_file=(lf)
  @log_file = lf
  @log = File.open(@log_file, "a")
  at_exit { @log.close unless @log.closed? }
end
new(app) click to toggle source
# File lib/heel/logger.rb, line 33
def initialize(app)
  super(app)
end

Public Instance Methods

<<(str) click to toggle source
# File lib/heel/logger.rb, line 37
def <<(str)
  Heel::Logger.log.write( str )
  Heel::Logger.log.flush
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.