Class Log4r::Logger
In: lib/log4r/staticlogger.rb
lib/log4r/logger.rb
lib/log4r/loggerfactory.rb
lib/log4r/repository.rb
Parent: Object

See log4r/logger.rb

Methods

==   []   add   additive=   each   each_logger   get   global   is_root?   level=   levels   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

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

Yields fullname and logger for every logger in the system.

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

Returns the root logger. Identical to Logger.root

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

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)

Returns the root logger. Identical to Logger.global

Public Instance methods

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

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

Set the logger level dynamically. Does not affect children.

Return array of defined levels.

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

Please don‘t reset the parent

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

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

[Validate]