[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: can apache log to MySQL ?



The "database" is the table of raw data and an index.  Apache can be made to
write its log file in the form of a table, via customlog.  Why use a pipe
for something that Apache can do nativly?  Unless you want up to the second
SQL-ified stats, just run savelog daily to rotate the logs.  Now unleash SQL
on the log files to parse and index the table of data.  Only after this has
been done is it "really" a database that you can use all kinds of neat tools
on.  Think of it as Analog on steroids and HGH. :)

At 08:31 PM 5/13/00 -0500, Nathan E Norman wrote:
>WHAT log file?  The database table is the "log file" ... there's no
>transferlog on disk in the form of a file.  The object of the game (in
>this thread anyway) is to get Apache to write directly to a database.
>You can do that with mod_perl or by piping the log output to a perl
>script that knows what to do.  See Craig's sample script a few posts
>back in this thread.
>
>I can't see why I'd want to load some old rotated log file into a database;
>I'd rather just run analog on it at that point.  However, I don't want
>to have a few hundred log files for all my different virtual hosts.

You can make Apache log everything to one log file.  Even if you pipe
directly into SQL format, you'ld still have all those logs unless you're
piping (logging) to the same spot.

Personally, I don't really trust piping with things of this magnitude.  It's
much safer to get the data on disk and THEN start playing with it.

+-------------------------------------------------------------------+
|        -=I T ' S  P R I N C I P L E  T H A T  C O U N T S=-       |
|=-                  -=ALAN KEYES FOR PRESIDENT=-                 -=|
| Balanced Budgets     Personal Freedoms     Morality     Lower Tax |
|=--                  http://www.Keyes2000.com.                  --=|
+???????????????????????????????????????????????????????????????????+



Reply to: