Net::DNS::SEC::Tools::rolllog
DNSSEC-Tools rollover logging interfaces.
- Provided by: dnssec-tools (Version: 2.2-2)
- Report a bug
DNSSEC-Tools rollover logging interfaces.
use Net::DNS::SEC::Tools::rolllog;
@levels = rolllog_levels();
$curlevel = rolllog_level();
$oldlevel = rolllog_level("info");
$oldlevel = rolllog_level(LOG_ERR,1);
$curlogfile = rolllog_file();
$oldlogfile = rolllog_file("-");
$oldlogfile = rolllog_file("/var/log/roll.log",1);
$loglevelstr = rolllog_str(8)
$loglevelstr = rolllog_str("info")
$ret = rolllog_num("info");
$bool = rolllog_validlevel($newlevel);
$bool = rolllog_validlevel(8);
$curtz = rolllog_gettz();
$oldtz = rolllog_settz('local');
rolllog_log(LOG_INFO,"example.com","zone is valid");
The Net::DNS::SEC::Tools::rolllog module provides logging interfaces for the rollover programs. The logging interfaces allow log messages to be recorded. rollerd must be running, as it is responsible for updating the log file.
Each log message is assigned a particular logging level. The valid logging levels are:
text numeric meaning
---- ------- -------
tmi 1 The highest level -- all log messages
are saved.
expire 3 A verbose countdown of zone expiration
is given.
info 4 Many informational messages are recorded.
phase 6 Each zone's current rollover phase
is given.
err 8 Errors are recorded.
fatal 9 Fatal errors are saved.
The levels include all numerically higher levels. For example, if the log level is set to phase, then err and fatal messages will also be recorded.
The useflag argument is a boolean that indicates whether or not to give a descriptive message if an invalid log file is given. If useflag is true, the message is given and the process exits; if false, no message is given. For any error condition, an empty string is returned.
The useflag argument is a boolean that indicates whether or not to give a descriptive message and exit if an invalid logging level is given. If useflag is true, the message is given and the process exits; if false, -1 is returned.
If given with no arguments, the current logging level is returned. In fact, the current level is always returned unless an error is found. -1 is returned on error.
timestamp: group: message
The level argument is the message's logging level. It will only be written to the log file if the current log level is numerically equal to or less than level.
group allows messages to be associated together. It is currently used by rollerd to group messages by the zone to which the message applies.
The message argument is the log message itself. Trailing newlines are removed.
If loglevel is an invalid log level, -1 is returned.
The current timezone selector is returned. If an invalid selector is given, then an undefined value is returned.
If loglevel is a text string, it is checked to ensure it is a valid log level. Case is irrelevant when checking loglevel.
If loglevel is numeric, it is must be in the valid range of log levels. undef is returned if loglevel is invalid.
The level argument is the logging level to be validated. It may be a numeric or textual value.
Copyright 2005-2014 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details.
Wayne Morrison, tewok@tislabs.com