httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff White" <>
Subject Re: [users@httpd] Apache logging
Date Sat, 12 Feb 2005 18:57:11 GMT

From: Nick Kirby

> LogFormat "%h %t \"%r\" %>s %b"

> Ideally I'd split the date from
> the time, but I can work on that.

Read on.

> What I want to do is send this
> into an access database.

From: "Jorge Schrauwen"

> if you want to put it in an access database.
> id recommend writing your own application
> that read the log and then add's the content
> to the access database, then clears the log.

No need to write anything, except
the query, with Microsoft's free
Log Parser 2.2 tool.


The SQL output format uploads
output records to a table in
a SQL database.

This output format can upload
records to a table in any
ODBC-compliant database,
including Microsoft SQL Server
and Microsoft Access databases.

When the target table does not
already exist in the specified
database, the SQL output format
creates a table with as many
columns as the number of fields in
the SELECT clause of the query.


Log Parser 2.2 will read the Apache log


New in 2.2 - The NCSA input format now
parses also combined and extended
NCSA log files.


and after reading the Apache log,
Log Parser will stick the output right
into your Access database or any
ODBC-compliant database.

For your

IP, Time, Request, Status, Size

something like

LogParser "Select RemoteHostName,
DateTime, Request, StatusCode,
BytesSent INTO MyTable FROM access.log"
-i:NCSA -o:SQL
-oConnString:"Driver={Microsoft Access Driver (*.mdb)};

All the above in one long line
in the command prompt or in
a file for Log Parser to use.

LogParser -i:[OPTIONS] file:Myquery.sql


LogParser file:myquery.sql?param1=value1+param2=value2"

Also check out sending the output to
custom-formatted HTML reports, and
formatted charts for the boss.

And for your splitting date and time
do something in your query like

TO_STRING(DateTime, 'MMM dd yyyy') as Date,
TO_STRING(DateTime, 'hh:mm:ss') as Time,

> to the access database, then clears the log.

No need to clear the log either


Log Parser offers a feature that
allows sequential executions of
the same query to only process
new data that has been logged
since the last execution. This
feature can be enabled with the
iCheckPoint parameter of the
input format.


To get Log Parser 2.2


Log parser is a powerful, versatile
tool that provides universal query
access to text-based data such as
log files, XML files and CSV files,
as well as key data sources on the
Windows operating system such as
the Event Log, the Registry, the file
system, and Active Directory.


Most software is designed to
accomplish a limited numer of
specific tasks. Log Parser is
different... the number of ways
it can be used is limited only
by the needs and imagination of
the user. The world is your
database with Log Parser.


Download details: Log Parser 2.2

And for more Log Parser information

MSN Search


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message