Loggers

Available loggers:

The default logger is the LogHub which supports all other loggers (including itself) and serves as a kind of redirection. The default logger within LogHub is the Informer, which prints nicely colored logs to stdout.

To simply store a copy of the logs in a file:

Ramaze::Log.loggers << Ramaze::Informer.new('inform.log')

For a faster, more flexible alternative, use the high performance Swiftcore Analogger

  Ramaze::Log.loggers = [Ramaze::Informer.new, Ramaze::Analogger.new('ramaze')]

To exchange the logger itself, just replace the Ramaze::Log constant:

  Ramaze::Log = Ramaze::Analogger.new('ramaze')
  # or without warning
  module Ramaze
    remove_const :Log
    Log = Analogger.new('ramaze')
  end
 
Back to top
features/loggers.txt · Last modified: 2008/05/11 03:59 by tmm1