Class: Log4r::Outputter

Class Log4r::Outputter |
In: | log4r/outputter/staticoutputter.rb log4r/outputter/outputterfactory.rb log4r/outputter/outputter.rb
Parent: | Object

Methods

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

Attributes

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

Public Class methods

[](name) src

Retrieve an outputter.

stdout() src

stderr() src

[]=(name, outputter) src

Set an outputter.

each() {|name, outputter}| ...} src

Yields each outputter’s name and reference.

each_outputter() {|outputter}| ...} src

new(_name, hash={}) src

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

level=(_level) src

dynamically change the level

only_at(*levels) src

Set the levels to log. All others will be ignored

formatter=(_formatter) src

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

flush() src

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