The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

logfile-cat - output (cat) file from the last saved position

SYNOPSIS

    logfile-cat [ --status=status-directory | --status=status-file ] logfile
    logfile-cat --help

DESCRIPTION

When processing log files, you want to continue reading where you left out the last time. The logfile-read program uses the Logfile::Read module internally to store the position last seen for the log file and retrieve it upon the subsequent invocation.

The program also handles rotated files -- if the log file was rotated since the last read, it is detected and the rest of the rotated file is read first, before proceeding to the newer rotate file or to the current log file.

The content is printed to the standard output.

OPTIONS

--status=STATUS DIRECTORY | --status=STATUS FILE

The parameter specifies either the status file which is used to store the position, or directory which will hold the status file. The file has to already exist (albeit empty) for the path to be recognized as status file, otherwise it is considered to be a status directory path.

--help

Short usage is printed.

EXAMPLES

    # output data from Apache's access_log
    logfile-read /var/log/httpd/access_log

    logfile-read --status /var/run/apache/logfile-read error_log

AUTHOR

Copyright (C) 2011 by Jan Pazdziora

LICENSE

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.