- SEE ALSO
- COPYRIGHT & LICENSE
Log::Fine::Levels - Define variable logging levels
Provides logging translations
use Log::Fine::Levels; # Instantiate the levels object using the default translations my $levels = Log::Fine::Levels->new(); # Instantiate the levels object using customized translations my $levels = Log::Fine::Levels->new("Java"); # Supported methods my @l = $levels->logLevels(); # grab list of levels my @m = $levels->logMasks(); # grab list of masks # Translation methods my $val = $levels->levelToValue("INFO"); my $bitmask = $levels->maskToValue("LOGMASK_INFO"); my $lvl = $levels->valueToLevel(3);
Log::Fine::Levels is used by the Log::Fine framework to translate customizable log levels (such as INFO, DEBUG, WARNING, etc) to and from an associated value as well as convenience methods for interacting with log levels (such as grabbing a list of levels).
Log::Fine::Levels only provides methods for interacting with log levels and associated log masks. In order to define levels and masks, it must be overridden. Note that, by default, the Log::Fine::Levels::Syslog class is used to define log levels.
Finally, Log::Fine::Levels is written to be independant of the Log::Fine framework and, as such, does not inherit any methods from Log::Fine. This allows developers to use Log::Fine::Levels by itself for defining customizable level packages for use in their own programs.
The following methods are provided:
Creates a new Log::Fine::Levels object
The name of the level map to use (e.g.,
an Log::Fine::Levels object
Getter for a bitmask representing ALL possible values
Bitmask representing all possible mask values
Level name to numeric value
The name of the level
The numeric value representing the given level name. Undef if name is not defined
Getter for all log levels
An array representing all level names, sorted by ascending numeric value
Getter for all log masks
An array representing all mask names, sorted by ascending numeric value
Mask name to numeric value
The name of the mask
The numeric value representing the given mask name. Undef if name is not defined
Level value to level name
The numeric value representing a level
The level name associated with the given numeric value. Undef if the value is not defined
Please report any bugs or feature requests to
bug-log-fine at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Log-Fine. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
RT: CPAN's request tracker
Christopher M. Fuhrman,
<cfuhrman at panix.com>
Copyright (c) 2009, 2010, 2013 Christopher M. Fuhrman, All rights reserved.
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.