1NAME
2    epylog ‐ Perl5 module for writing perl modules for epylog.
3
4SYNOPSIS
5     use epylog;
6
7     # create a new epylog object
8     my $du = new epylog;
9
10     # initialize the object
11     $du‐>init(’modulename’);
12
13     # get a username from a userid
14     $du‐>getuname(500);
15
16     # get a hostname from an IP address
17     $du‐>gethost(’127.0.0.1’);
18
19     # find the system name in a standard syslog line
20     $du‐>getsystem($syslogline);
21
22     # get the value of an environment variable
23     # first parameter is the name of the variable, second one is
24     # the default value to return if the variable is undefined.
25     $du‐>option(’TMPDIR’, ’/tmp’);
26
27     #  return the next available syslog line from the logs (LOG‐
28CAT)
29     $du‐>nextline();
30
31     # check if the logfile is EOF’d. Returns 0 if not yet.
32     $du‐>islogeof();
33
34     # add a string or an array of strings to the report  (LOGRE‐
35PORT)
36     $du‐>pushrep(’Report line’);
37
38     #  add  a syslog line entry to the list of analyzed and fil‐
39tered
40     # lines (LOGFILTER)
41     $du‐>pushfilt($syslog_line);
42
43     # intelligently output some debug information.
44     # first parameter is level, second parameter is  the  string
45to output.
46     # level 0  ‐‐ critical errors, always output
47     # level 1  ‐‐ standard epylog execution, without "‐‐quiet"
48     # level 2> ‐‐ additional levels of verbosity.
49     $du‐>mlog(1, ’Processing data’);
50
51     #  return how many lines were added to the filter file (LOG‐
52FILTER)
53     $du‐>filtsize();
54
55     # return how many lines were added to the report  file  (LO‐
56GREPORT)
57     $du‐>repsize();
58
59     # make a pretty report header.
60     $du‐>mkrephdr(’NOTICED REBOOTS’);
61
62     #  call  this at the end of your module! It closes the file‐
63handles and
64     # writes out the report.
65     $du‐>finalize();
66
67AUTHORS
68     Konstantin Ryabitsev <icon@linux.duke.edu>
69     Michael Stenner <mstenner@phy.duke.edu>
70
71     Duke University Physics
72
73REVISION
74    $Revision: 1.1.2.1 $
75
76SEE ALSO
77    epylog(8), epylog_modules(5)
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum