Wombat::Logger::LoggerBase - logger base class
package My::Logger; use base qw(Wombat::Logger::LoggerBase);
Convenience base class for logger implementations. The only method that must be implemented is
write(), plus any accessor methods required for configuration, and
stop() if resources must be initialized and cleaned up.
Construct and return a Wombat::Logger::LoggerBase instance, initializing fields appropriately. If subclasses override the constructor, they must be sure to call
Return the Container with which this Logger is associated.
Set the Container with which this Logger is associated.
the Container with which this Logger is associated
Return the verbosity level of this Logger.
Set the verbosity level of this Logger. Messages logged with a higher verbosity than this will be silently ignored.
Allowable values in increasing order are:
The default level is 'ERROR'.
the verbosity level, as a string
if the specified log level is not one of the allowed values
Send a message and/or an exception to the log destination. If a level is specified, the Logger must be set to a verbosity level greater than or equal to the specified level. If a level is not specified, the message and/or exception will be logged unconditionally.
Write the specified string to the log destination. The default implementation does nothing. Subclasses must override this method.
the string to write to the log destination
Prepare for the beginning of active use of this Logger. This method must be called before any of the public methods of the component are utilized. Subclasses should initialize logging resources with this method.
if the Logger cannot be started
Gracefully terminate the active use of this Logger. This method must be the last called on a given instance of this component. Subclasses should release logging resources with this method.
if the Logger cannot be stopped
Brian Moseley, firstname.lastname@example.org