epylog man page

2[1mNAME2[0m
   epylog - Perl5 module for writing perl modules for epylog.

2[1mSYNOPSIS2[0m
    use epylog;

    # create a new epylog object
    my $du = new epylog;

    # initialize the object
    $du->init('modulename');

    # get a username from a userid
    $du->getuname(500);

    # get a hostname from an IP address
    $du->gethost('127.0.0.1');

    # find the system name in a standard syslog line
    $du->getsystem($syslogline);

    # get the value of an environment variable
    # first parameter is the name of the variable, second one is
    # the default value to return if the variable is undefined.
    $du->option('TMPDIR', '/tmp');

    # return the next available syslog line from the logs (LOGCAT)
    $du->nextline();

    # check if the logfile is EOF'd. Returns 0 if not yet.
    $du->islogeof();

    # add a string or an array of strings to the report (LOGREPORT)
    $du->pushrep('Report line');

    # add a syslog line entry to the list of analyzed and filtered
    # lines (LOGFILTER)
    $du->pushfilt($syslog_line);

    # intelligently output some debug information.
    # first parameter is level, second parameter is the string to output.
    # level 0  -- critical errors, always output
    # level 1  -- standard epylog execution, without "--quiet"
    # level 2> -- additional levels of verbosity.
    $du->mlog(1, 'Processing data');

    # return how many lines were added to the filter file (LOGFILTER)
    $du->filtsize();

    # return how many lines were added to the report file (LOGREPORT)
    $du->repsize();

    # make a pretty report header.
    $du->mkrephdr('NOTICED REBOOTS');

    # call this at the end of your module! It closes the filehandles and
    # writes out the report.
    $du->finalize();

2[1mAUTHORS2[0m
    Konstantin Ryabitsev <icon@linux.duke.edu>
    Michael Stenner <mstenner@phy.duke.edu>

    Duke University Physics

2[1mREVISION2[0m
   $Revision$

2[1mSEE ALSO2[0m
   epylog(8), epylog_modules(5)

Referenced By

epylog.conf(5).