<br><br><div class="gmail_quote">On Wed, Dec 9, 2009 at 12:26 PM,  <span dir="ltr">&lt;<a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On 8 Dec, 09:04 pm, <a href="mailto:landreville@deadtreepages.com">landreville@deadtreepages.com</a> wrote:<br>
&gt;Is there a way I can customize the format of log file?<br>
&gt;I want to add more information to each line (about the xmlrpc method<br>
&gt;being<br>
&gt;called), but I can&#39;t find where these lines get written out. I know I<br>
&gt;can<br>
&gt;print a message to the log in my _getFunction, but I would prefer to<br>
&gt;have<br>
&gt;one line per request.<br>
<br>
</div></div>Are you talking about the CLF request log or the main log file (normally<br>
called &quot;twistd.log&quot;)?<br>
<br>
The former can be controlled by overriding the &quot;log&quot; method of Site.<br>
The latter is controlled by the general log observer(s) which is<br>
installed.  You can read about customizing the log observer using .tac<br>
files in the online documentation:<br>
<br>
  <a href="http://twistedmatrix.com/documents/current/core/howto/application.html" target="_blank">http://twistedmatrix.com/documents/current/core/howto/application.html</a><br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br></div><div>I&#39;m talking about the main log file (twistd.log) that is created. I want to customize the lines that are written to it, the document only tells me how to use a different observer, not how to format the lines that are being output by twistd.</div>
<div><br></div><div>I would like to change the output from:</div><div><div>2009-12-09 12:59:01-0500 [-] 127.0.0.1 - - [09/Dec/2009:17:59:01 +0000] &quot;POST /XMLRPC HTTP/1.0&quot; 200 647 &quot;-&quot; &quot;<a href="http://xmlrpclib.py/1.0.1">xmlrpclib.py/1.0.1</a> (by <a href="http://www.pythonware.com">www.pythonware.com</a>)</div>
<div>to include &quot;xmlrpc method: system.listMethods&quot; at the end (or something similar to include the methd name&quot;.</div><div><br></div><div>I see in the observers an eventDict is passed in to be output in the log, but where does that eventDict get created/passed in?</div>
</div></div><br>