Re: can apache log to MySQL ?
On Thu, May 11, 2000 at 11:15:06PM +1000, Craig Sanders wrote:
> here's a first stab at it. note, it's completely untested and
> might even work. i've used exactly the same database table as in
> Apache::DBILogger, so anything that works with that should also work
> with this.
i've actually bothered to test this now, and it works. apart from the
two previous corrections i posted, i only made one other small mistake.
> LogFormat "%v:*:%b:*:%u:*:%f:*:%h:*:%a:*:%s:*:%{%Y-%m-%d %H:%M:%S+%z}t:*:%{Content-type:}o:*:%U:*:%{Referer}i:*:%{User-Agent}i:*:%{cookie}n" dbilog
should be:
LogFormat "%v:*:%b:*:%u:*:%f:*:%h:*:%a:*:%s:*:%{%Y-%m-%d %H:%M:%S%z}t:*:%{Content-type:}o:*:%U:*:%{Referer}i:*:%{User-Agent}i:*:%{cookie}n" dbilog
it's hard to spot, but the difference is that %z in the time format
doesn't need a "+" before it, as it already includes one.
craig
--
craig sanders
Reply to: