<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=125165522-06102004>OK, I
got some custom logging to a database working and I can pretty much
capture anything generated by "normal" Apache logging except... I don't see
any equivalent to the Apache directive like LogFormat "%T %D" where %T and %D
are the respective times to serve the HTTP requests in seconds and
microseconds.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=125165522-06102004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=125165522-06102004>Is
there any reason the PythonLogHandler doesn't pick this up from the Apache
logging phase? </SPAN></FONT><FONT face=Arial color=#0000ff size=2><SPAN
class=125165522-06102004>Am I stuck because there's "no way to get there from
here?"</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=125165522-06102004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=125165522-06102004>Please
advise and TIA! TIA! TIA! ...</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=125165522-06102004>D. B.
Dweeb</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=125165522-06102004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=125165522-06102004></SPAN></FONT><FONT face=Arial color=#0000ff
size=2><SPAN class=125165522-06102004></SPAN></FONT><FONT face=Arial
color=#0000ff size=2><SPAN class=125165522-06102004></SPAN></FONT> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
mod_python-bounces@modpython.org [mailto:mod_python-bounces@modpython.org]
<B>On Behalf Of </B>Orr, Steve<BR><B>Sent:</B> Wednesday, October 06, 2004
8:28 AM<BR><B>To:</B> Jaco Smuts<BR><B>Cc:</B> mod_python user mailing
list<BR><B>Subject:</B> RE: [mod_python] Processing Apache
Logs<BR><BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=876061013-06102004>Yes,
we're actually using it in a limited way. It's pretty good but our data
warehouse needs to be in Oracle. Currently we use mod_sql to capture the data
into MySQL then copy subsets of data to Oracle. </SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=876061013-06102004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=876061013-06102004>I
was looking at mod_python's access to the Apache internals and it looks like
the various attributes (members) of the request, connection, and server
objects would contain everything needed to capture the Apache log data
(and more?) so I'm thinking the PythonLogHandler could be used to
get this data and put it into a database as mentioned in the
</SPAN></FONT><FONT face=Arial color=#0000ff size=2><SPAN
class=876061013-06102004>ONLamp Python DevCenter article, (</SPAN></FONT><FONT
face=Arial color=#0000ff size=2><SPAN class=876061013-06102004><A
href="http://www.onlamp.com/pub/a/python/2003/10/02/mod_python.html">http://www.onlamp.com/pub/a/python/2003/10/02/mod_python.html</A>).
</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=876061013-06102004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=876061013-06102004>Quote:</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT face=Arial size=2><SPAN class=876061013-06102004><FONT
face="Times New Roman">"Mod_python provides the ability to register for any
phase and write the processing function in Python. This is a very powerful
feature, because it opens the door for many innovative and exciting ways to
use Apache. For example, you can write Python code to do authentication
processing or custom logging (perhaps sending logs to a database while
maintaining real-time statistics)</FONT>."</SPAN></FONT></DIV></BLOCKQUOTE>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=876061013-06102004>This
is all new to me and I need an example to get started with the
PythonLogHandler. So... it would be nice to have a quick and dirty example to
backup the claim in the article. :-)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=876061013-06102004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=876061013-06102004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=876061013-06102004>With
admiration for the mod_python project,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=876061013-06102004>D.
B. Dweeb, AKA Steve Orr</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=876061013-06102004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=876061013-06102004></SPAN></FONT><FONT face=Arial color=#0000ff
size=2><SPAN class=876061013-06102004></SPAN></FONT><FONT face=Arial
color=#0000ff size=2><SPAN class=876061013-06102004></SPAN></FONT><FONT
face=Arial color=#0000ff size=2><SPAN
class=876061013-06102004></SPAN></FONT> </DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Jaco Smuts
[mailto:JSmuts@clover.co.za] <BR><B>Sent:</B> Wednesday, October 06, 2004
12:55 AM<BR><B>To:</B> Orr, Steve<BR><B>Cc:</B> mod_python user mailing
list; mod_python-bounces@modpython.org<BR><B>Subject:</B> Re: [mod_python]
Processing Apache Logs<BR><BR></FONT></DIV><BR><FONT face=sans-serif
size=2>Have you looked at mod_sql ?</FONT> <BR><BR><FONT
face=sans-serif size=2>jaco</FONT> <BR><BR><BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD width="40%"><FONT face=sans-serif size=1><B>"Orr, Steve"
<sorr@rightnow.com></B> </FONT><BR><FONT face=sans-serif
size=1>Sent by: mod_python-bounces@modpython.org</FONT>
<P><FONT face=sans-serif size=1>10/05/2004 08:08 PM</FONT> </P>
<TD width="59%">
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD>
<DIV align=right><FONT face=sans-serif size=1>To</FONT></DIV>
<TD><FONT face=sans-serif size=1>"mod_python user mailing list"
<mod_python@modpython.org></FONT>
<TR vAlign=top>
<TD>
<DIV align=right><FONT face=sans-serif size=1>cc</FONT></DIV>
<TD>
<TR vAlign=top>
<TD>
<DIV align=right><FONT face=sans-serif
size=1>Subject</FONT></DIV>
<TD><FONT face=sans-serif size=1>[mod_python] Processing Apache
Logs</FONT></TD></TR></TBODY></TABLE><BR>
<TABLE>
<TBODY>
<TR vAlign=top>
<TD>
<TD></TD></TR></TBODY></TABLE><BR></TD></TR></TBODY></TABLE><BR><BR><BR><FONT
size=2><TT>The ONLamp "Introducing mod_python" article mentions the
possibility of<BR>doing custom Apache logging with mod_python and inserting
log data<BR>directly to a database. Are there any examples of this or has
anyone on<BR>this list done such a thing? Any guidance or
suggestions?<BR><BR>I'm looking at building a data warehouse from the Apache
log output. The<BR>web apps on the load balanced web servers to be monitored
do not use any<BR>Python code. Are there 3rd party (non-Pythonic perhaps)
log parser apps<BR>I should look at instead of cutting my own mod_python
code? <BR><BR><BR>AtDhVaAnNkCsE,<BR>D. B.
Dweeb<BR><BR>_______________________________________________<BR>Mod_python
mailing
list<BR>Mod_python@modpython.org<BR>http://mailman.modpython.org/mailman/listinfo/mod_python<BR></TT></FONT><BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>