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

NAME

6       Net::DNS::SEC::Tools::rolllog - DNSSEC-Tools rollover logging
7       interfaces.
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         $bool = rolllog_validlevel($newlevel);
28         $bool = rolllog_validlevel(8);
29
30         $curtz = rolllog_gettz();
31         $oldtz = rolllog_settz('local');
32
33         rolllog_log(LOG_INFO,"example.com","zone is valid");
34

DESCRIPTION

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

LOGGING INTERFACES

61       rolllog_levels()
62           This routine returns an array holding the text forms of the user-
63           settable logging levels.  The levels are returned in order, from
64           most verbose to least.
65
66       rolllog_level(newlevel,useflag)
67           This routine sets and retrieves the logging level for rollerd.  The
68           newlevel argument specifies the new logging level to be set.
69           newlevel may be given in either text or numeric form.
70
71           The useflag argument is a boolean that indicates whether or not to
72           give a descriptive message and exit if an invalid logging level is
73           given.  If useflag is true, the message is given and the process
74           exits; if false, -1 is returned.
75
76           If given with no arguments, the current logging level is returned.
77           In fact, the current level is always returned unless an error is
78           found.  -1 is returned on error.
79
80       rolllog_file(newfile,useflag)
81           This routine sets and retrieves the log file for rollerd.  The
82           newfile argument specifies the new log file to be set.  If newfile
83           exists, it must be a regular file.
84
85           The useflag argument is a boolean that indicates whether or not to
86           give a descriptive message if an invalid logging level is given.
87           If useflag is true, the message is given and the process exits; if
88           false, no message is given.  For any error condition, an empty
89           string is returned.
90
91       rolllog_num(loglevel)
92           This routine translates a text log level (given in loglevel) into
93           the associated numeric log level.  The numeric log level is
94           returned to the caller.
95
96           If loglevel is an invalid log level, -1 is returned.
97
98       rolllog_gettz()
99           This routine returns the timezone selector currently in use.  This
100           value may be either 'gmt' (for Greenwich Mean Time) or 'local' (for
101           the host's local time.)
102
103       rolllog_settz(tzsel)
104           This routine sets the timezone to be used for timestamps in
105           messages written to the log.  This tzsel value may be either 'gmt'
106           (Greenwich Mean Time) or 'local' (for the host's local time.)
107           tzsel may be uppercase or lowercase; the value will be converted to
108           lowercase.  If no value is passed, then the default will be used.
109
110           The current timezone selector is returned.  If an invalid selector
111           is given, then an undefined value is returned.
112
113       rolllog_str(loglevel)
114           This routine translates a log level (given in loglevel) into the
115           associated text log level.  The text log level is returned to the
116           caller.
117
118           If loglevel is a text string, it is checked to ensure it is a valid
119           log level.  Case is irrelevant when checking loglevel.
120
121           If loglevel is numeric, it is must be in the valid range of log
122           levels.  undef is returned if loglevel is invalid.
123
124       rolllog_log(level,group,message)
125           The rolllog_log() interface writes a message to the log file.  Log
126           messages have this format:
127
128                   timestamp: group: message
129
130           The level argument is the message's logging level.  It will only be
131           written to the log file if the current log level is numerically
132           equal to or less than level.
133
134           group allows messages to be associated together.  It is currently
135           used by rollerd to group messages by the zone to which the message
136           applies.
137
138           The message argument is the log message itself.  Trailing newlines
139           are removed.
140
141       rolllog_validlevel(level)
142           This interface returns a boolean value indicating if the given
143           logging level is valid.
144
145           The level argument is the logging level to be validated.  It may be
146           a numeric or textual value.
147
149       Copyright 2005-2011 SPARTA, Inc.  All rights reserved.  See the COPYING
150       file included with the DNSSEC-Tools package for details.
151

AUTHOR

153       Wayne Morrison, tewok@users.sourceforge.net
154

SEE ALSO

156       rollctl(1)
157
158       rollerd(8)
159
160       Net::DNS::SEC::Tools::rollmgr.pm(3)
161
162
163
164perl v5.12.4                      2011-03-22                        rolllog(3)
Impressum