Class Log4r::Outputter
In: lib/log4r/outputter/staticoutputter.rb
lib/log4r/outputter/outputterfactory.rb
lib/log4r/outputter/outputter.rb
Parent: Monitor

Methods

[]   []=   each   each_outputter   flush   formatter=   level=   new   only_at   stderr   stdout   validate_hash  

Attributes

formatter  [R] 
level  [R] 
name  [R] 

Public Class methods

Retrieve an outputter.

Set an outputter.

Yields each outputter‘s name and reference.

An Outputter needs a name. RootLogger will be loaded if not already done. The hash arguments are as follows:

:level
Logger level. Optional, defaults to root level
:formatter
A Formatter. Defaults to DefaultFormatter

Public Instance methods

Call flush to force an outputter to write out any buffered log events. Similar to IO#flush, so use in a similar fashion.

Dynamically change the formatter. You can just specify a Class object and the formatter will invoke new or instance on it as appropriate.

dynamically change the level

Set the levels to log. All others will be ignored

Protected Instance methods

Validates the common hash arguments. For now, that would be +:level+, +:formatter+ and the string equivalents

[Validate]