Metadata-Version: 1.0
Name: scanerrlog
Version: 2.01
Summary: ScanErrLog v2.01 (C) 2000 Free Software Foundation

This Python module allows people to parse Apache error_log files from
one of different possible sources (filename, stdin, python file object),
and present their datas in decreasing number of occurences of error
messages.

This is particularly useful if you want to quickly solve the most
annoying problems web surfers encounter visiting your site.

If you run this module directly, it will parse each file which name was
passed on the command line.

If you don't pass any argument on the command line, then scanerrlog will
read an error_log from stdin if you've piped some file or command to its
standard input, or it will print its documentation if you've not.

You can also use it as a CGI script, but you'll not be able to
modify the pattern and outputfile used, and the input filename
should not begin with / or contain .. in its name, all for
security reasons. The names you may use for your CGI variables
are: continue, date, withoutheader, title, limit, exclude, format and
inputfile.
if continue, date or withoutheader exist in your form, these options
will be set to TRUE whatever value they have. See ScanErrLog.html for
a sample form to launch ScanErrLog as a CGI script.


e.g.:

    ./scanerrlog.py

prints scanerrlog's documentation (what you are reading now)


    ./scanerrlog.py /var/log/httpd/error_log /var/log/httpd/error_log.1

will read datas from the specified files.


    ./scanerrlog </var/log/httpd/error_log

will read datas from standard input

You can pass some options on the command line:

options:
        -c | --continue         useful if you want to parse the same file
                                many times (e.g. every week): the current
                                state and statistics of the file are saved
                                in a file named ScanErrLog.stats in the
                                same directory, so you don't have to reparse
                                the beginning of the file each time. You
                                should use this option either to tell
                                ScanErrLog to save the statistics or to reuse
                                the saved ones.
                                Without this option the file is completely
                                parsed again, even if you've got an old
                                statistics file saved in the same directory.
                                WARNING: this option is incompatible with
                                the parsing of multiple files.
        -d | --date             include in the final report the date when
                                each message appeared for the last time.
                                this option is mutually exclusive with
                                the --pattern option.
        -e | --exclude e        e is a slash separated list of
                                messages severity. All messages with
                                a severity listed in e are excluded
                                from the final report. By default all
                                messages are included. For example,
                                e can be: info/debug to exclude all
                                messages which severity is info or
                                debug.
        -f | --format f         output format for the report, f can be
                                any of:
                                    'html', 'pdf', 'text', 'xml'
                                the default format is 'html'.
        -h | --help             displays this help screen.
        -l | --limit lim        selects messages only if their number of
                                occurences equals or exceeds lim.
                                lim's default value is 1, meaning all
                                messages are included in the final report.
        -n | --nocumulate       don't cumulate counts for all the files
                                passed on the command line. the old
                                -c | --cumulate option is now the default.
                                if the following option -o is not used,
                                then -n implies -w because all reports
                                will be in the same file (stdout).
        -o | --outputfile f     save the report in the file f.
                                if -n is used, then the filename will
                                be n.f where n is an integer incremented
                                for each new file and starting at 1.
        -p | --pattern regexp   select only the lines which match regexp.
                                the default regexp is:
        ^(httpd: |\B)\[([^\[\]]+)\] \[([^\[\]]+)\] (?:\[([^\[\]]+)\] )?
                                which selects all Apache logged messages,
                                but not errors from CGI scripts for example.
                                to work correctly, your regexp should consume
                                all characters from the beginning of the
                                error line up to the beginning of the real
                                error message.
                                this option is mutually exclusive with
                                the --date option.
        -t | --title t          sets the report title.
        -v | --version          displays ScanErrLog's version number.
        -w | --withoutheader    suppress the header of the HTML report.
                                useful if you want to include the report
                                directly into another HTML document.


Warning: some options may not work with all report formats.

A fifth possibility is to import this module into another python
program and use the ApacheErrorLog class it defines.

ScanErrLog comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it under
certain conditions; refer to the Gnu General Public License for details.
You'll find the GNU GPL in the file COPYING which should came along
with this software or at http://www.gnu.org

Please e-mail bugs to: alet@librelogiciel.com (Jerome Alet)
Home-page: http://www.librelogiciel.com/software/
Author: Jerome Alet
Author-email: alet@librelogiciel.com
License: GNU GPL
Description: UNKNOWN
Platform: UNKNOWN
