Class Autumn::LogFacade
In: lib/autumn/log_facade.rb
Parent: Object

This class is a facade for Ruby‘s Logger that adds additional information to log entries. LogFacade will pass any method calls onto a Logger instance, but reformat log entries to include an Autumn object‘s type and name.

For example, if you wanted a LogFacade for a Leaf named "Scorekeeper", you could instantiate one:

 facade = LogFacade.new(logger, 'Leaf', 'Scorekeeper')

And a call such as:

 facade.info "Starting up"

Would be reformatted as "Scorekeeper (Leaf): Starting up".

In addition, this class will log messages to STDOUT if the debug global option is set. Instantiation of this class is handled by Genesis and should not normally be done by the user.

Methods

new  

Attributes

name  [R]  The name of the Autumn object.
type  [R]  The Autumn object type (typically "Stem" or "Leaf").

Public Class methods

Creates a new facade for logger that prepends type and name information to each log message.

[Validate]