Class: Log4r::Logger

Class Log4r::Logger |
In: | /home/cepheus/projects/prep/log4r-1.0.1/src/log4r/staticlogger.rb /home/cepheus/projects/prep/log4r-1.0.1/src/log4r/repository.rb /home/cepheus/projects/prep/log4r-1.0.1/src/log4r/loggerfactory.rb /home/cepheus/projects/prep/log4r-1.0.1/src/log4r/logger.rb
Parent: | Object

Methods

== [] add additive= each each_logger get global is_root? level= log_internal new outputters= parent= remove root trace=

Attributes

additive | [R] |
fullname | [R] |
level | [R] |
name | [R] |
outputters | [R] |
parent | [R] |
path | [R] |
trace | [R] |

Public Class methods

root()

Returns the root logger. Identical to Logger.global

global()

Returns the root logger. Identical to Logger.root

[](_fullname)

Get a logger with a fullname from the repository or nil if logger wasn't found.

get(_fullname)

Like Logger[] except that it raises NameError if Logger wasn't found.

each() {|fullname, logger| ...}

Yields fullname and logger for every logger in the system.

each_logger() {|logger}| ...}

log_internal(level=1) {|)| ...}

Internal logging for Log4r components. Accepts only blocks. To see such log events, create a logger named 'log4r' and give it an outputter.

new(_fullname, _level=nil, _additive=true, _trace=false)

Logger requires a name. The last 3 parameters are:

level: | Do I have a level? (Otherwise, I'll inherit my parent's)
additive: | Am I additive?
trace: | Do I record the execution trace? (slows things a wee bit)

Public Instance methods

level=(_level)

Set the logger level dynamically. Does not affect children.

additive=(_additive)

Set the additivity of the logger dynamically. True or false.

trace=(_trace)

Set whether the logger traces. Can be set dynamically. Defaults to false and understands the strings 'true' and 'false'.

parent=(parent)

Please don't reset the parent

outputters=(_outputters)

Set the Outputters dynamically by name or reference. Can be done any time.

add(*_outputters)

Add outputters by name or by reference. Can be done any time.

remove(*_outputters)

Remove outputters from this logger by name only. Can be done any time.

is_root?()

==(other)