NAME
Sys::SyslogMessages - Figure out where syslog is and copy or tail it.(on Linux)
SYNOPSIS
use Sys::SyslogMessages;
$linux = new Sys::SyslogMessages({'output_file' => 'syslog.tail'});
$linux->tail({'number_lines' => '500'});
$linux->tail({'number_days' => '1', 'output_file' => 'syslog.hr.tail'});
$linux->copy({'output_file' => 'syslog.log'});
DESCRIPTION
This is a simple module that finds the system logfile on Linux is and can copy it or tail it to a file. It works for syslogd or syslog-ng. The syslog configuration must be in the standard locations.
The method 'tail' now has more options: number_lines, number_minutes, number_hours, number_days. (and of course 'output_file') The time designations are specified if the user wishes to tail a specific time interval backwards from 'now'. One issue with this feature is that it will collect too much information if the log contains more than one year of data, as there are no years specified in the log.
DEPENDENCIES
This module depends on module DateTime.
TODO
Be able to save various categories of logs, i.e. kern.* mail.*. Add copy dmsg support. Tail syslog from a particular time or since last reboot. Check for any other sys-logger options besides syslogd or syslog-ng.
AUTHORS
Judith Lebzelter, <judith@osdl.org>
COPYRIGHT AND LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.