Website Setup & Info

ID #1052

How do I access my raw web logs?

Access logs at GeekISP are handled through the shell script 'web-log-tail'. You must have web logs included in your hosting plan, or purchase it separately in order for web-log-tail to display your logs.

Web-log-tail works in two primary modes: 'tail' and 'dump' mode. Tail mode shows you entries in your access logs as your site is accessed, and dump mode prints all entries over a specified period of time.

Some examples:

$ web-log-tail
No domain specified.
-d, Domain to examine.
-n, --number-of-lines=5 Number of lines to show initially.
-o, --output-format=combined Output format. Supports: common, combined, vhost-combined.
--start-month=January Start month to dump. If --end-month is not specified, dumps 1 month of logs
--end-month=February End month to dump. Works with --start-month.
--start-date='January 1 2006'
Start date to dump. Analogous to --start-month
--end-date='January 31 2006' End date to dump. Works with --start-date.
-h, --help Show this message

The only required parameter is the domain name. Web-log-tail defaults to 'tail' mode, but switches to 'dump' mode if you specify any of the --start-* --end-* arguments. Results are always written to standard output.

The --start-date and --end-date parameters take two special values: 'yesterday' and 'today'. These are particularly useful for cron jobs. If --end-date is unspecified, it defaults to the start-date value, plus 1 day.

To dump yesterday's log, and append it to your local acces log:

$ mkdir ~/logs/

$ web-log-tail --start-date=yesterday >> ~/logs/

Tags: -

Related entries:

Last update: 2006-07-24 12:15
Author: Dave Steinberg
Revision: 1.0

Digg it! Print this record Send to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this entry:

Average rating: 4 out of 5 (1 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry