1rolllog(3)            User Contributed Perl Documentation           rolllog(3)
2
3
4

NAME

6       Net::DNS::SEC::Tools::rolllog - DNSSEC-Tools rollover logging inter‐
7       faces.
8

SYNOPSIS

10         use Net::DNS::SEC::Tools::rolllog;
11
12         @levels = rolllog_levels();
13
14         $curlevel = rolllog_level();
15         $oldlevel = rolllog_level("info");
16         $oldlevel = rolllog_level(LOG_ERR,1);
17
18         $curlogfile = rolllog_file();
19         $oldlogfile = rolllog_file("-");
20         $oldlogfile = rolllog_file("/var/log/roll.log",1);
21
22         $loglevelstr = rolllog_str(8)
23         $loglevelstr = rolllog_str("info")
24
25         $ret = rolllog_num("info");
26
27         rolllog_log(LOG_INFO,"example.com","zone is valid");
28

DESCRIPTION

30       The Net::DNS::SEC::Tools::rolllog module provides logging interfaces
31       for the rollover programs.  The logging interfaces allow log messages
32       to be recorded.  rollerd must be running, as it is responsible for
33       updating the log file.
34
35       Each log message is assigned a particular logging level.  The valid
36       logging levels are:
37
38           text       numeric  meaning
39           ----       -------  -------
40           tmi           1     The highest level -- all log messages
41                               are saved.
42           expire        3     A verbose countdown of zone expiration
43                               is given.
44           info          4     Many informational messages are recorded.
45           phase         6     Each zone's current rollover phase
46                               is given.
47           err           8     Errors are recorded.
48           fatal         9     Fatal errors are saved.
49
50       The levels include all numerically higher levels.  For example, if the
51       log level is set to phase, then err and fatal messages will also be
52       recorded.
53

LOGGING INTERFACES

55       rolllog_levels()
56           This routine returns an array holding the text forms of the user-
57           settable logging levels.  The levels are returned in order, from
58           most verbose to least.
59
60       rolllog_level(newlevel,useflag)
61           This routine sets and retrieves the logging level for rollerd.  The
62           newlevel argument specifies the new logging level to be set.
63           newlevel may be given in either text or numeric form.
64
65           The useflag argument is a boolean that indicates whether or not to
66           give a descriptive message and exit if an invalid logging level is
67           given.  If useflag is true, the message is given and the process
68           exits; if false, -1 is returned.
69
70           If given with no arguments, the current logging level is returned.
71           In fact, the current level is always returned unless an error is
72           found.  -1 is returned on error.
73
74       rolllog_file(newfile,useflag)
75           This routine sets and retrieves the log file for rollerd.  The new‐
76           file argument specifies the new log file to be set.  If newfile
77           exists, it must be a regular file.
78
79           The useflag argument is a boolean that indicates whether or not to
80           give a descriptive message if an invalid logging level is given.
81           If useflag is true, the message is given and the process exits; if
82           false, no message is given.  For any error condition, an empty
83           string is returned.
84
85       rolllog_num(loglevel)
86           This routine translates a text log level (given in loglevel) into
87           the associated numeric log level.  The numeric log level is
88           returned to the caller.
89
90           If loglevel is an invalid log level, -1 is returned.
91
92       rolllog_str(loglevel)
93           This routine translates a log level (given in loglevel) into the
94           associated text log level.  The text log level is returned to the
95           caller.
96
97           If loglevel is a text string, it is checked to ensure it is a valid
98           log level.  Case is irrelevant when checking loglevel.
99
100           If loglevel is numeric, it is must be in the valid range of log
101           levels.  undef is returned if loglevel is invalid.
102
103       rolllog_log(level,group,message)
104           The rolllog_log() interface writes a message to the log file.  Log
105           messages have this format:
106
107                   timestamp: group: message
108
109           The level argument is the message's logging level.  It will only be
110           written to the log file if the current log level is numerically
111           equal to or less than level.
112
113           group allows messages to be associated together.  It is currently
114           used by rollerd to group messages by the zone to which the message
115           applies.
116
117           The message argument is the log message itself.  Trailing newlines
118           are removed.
119
121       Copyright 2005-2007 SPARTA, Inc.  All rights reserved.  See the COPYING
122       file included with the DNSSEC-Tools package for details.
123

AUTHOR

125       Wayne Morrison, tewok@users.sourceforge.net
126

SEE ALSO

128       rollctl(1)
129
130       rollerd(8)
131
132       Net::DNS::SEC::Tools::rollmgr.pm(3)
133
134
135
136perl v5.8.8                       2008-02-15                        rolllog(3)
Impressum