http://plumberjack.blogspot.com/2010/09/configuring-logging-for-web.html if you care). I'm not trying to be obstructive, honestly.">

(original) (raw)

On 12/8/2010 9:43 AM, Vinay Sajip wrote:
<offtopic>

As am off-topic example, Armin Ronacher kept on saying in various posts and
presentations that you couldn't use stdlib logging for web applications, that
there were fundamental problems with it. But when he actually sent me his
specific problem statement, I gave him a solution without spending too much time
on it (see
http://plumberjack.blogspot.com/2010/09/configuring-logging-for-web.html if you
care). I'm not trying to be obstructive, honestly.

</offtopic>





Since my application is also web server related, I was curious
enough to look at this blog posting to see if it would be a good
starter example that is missing from the manual.  I don't think it
is, as it is somewhat complex, although it is multi-module, and even
multi-thread, so it might make a good example for other parts of the
documentation (but maybe they already have good examples; I've only
looked at the first 8%).



In trying to understand it, I couldn't figure out why the WebApp
class needs to keep track of the threads that are running the that
web app.  Why isn't it good enough for the thread to know the name
of the app?  The filter copies the appName from the thread to the
record; the InjectingFilter.filter not replace



 record.appName = tlocal.appName
tname = threading.currentThread().getName()
return tname in self.app.threads

by

record.appName = tlocal.appName
return appName == self.app.name

and get the same effect, without needing to mainting the self.threads "database"?

Or what am I missing?

Glenn