logging via SocketHandler and TCPserver

Rob Wolfe rw at smsnet.pl
Tue Jul 15 21:34:22 CEST 2008

Larry Bates <larry.bates at websafe.com`> writes:

> Can multiple applications send SocketHandler logging records to the
> same socket server on the same port simultaneously?  

Of course they can. Server can accept requests from many clients.
You have used `SocketServer.ThreadingTCPServer`. That server for example
handles every request in a different thread.

> If so, then I understand your answer completely and will go 
> in that direction.  I guess I was trying to not use up 
> bandwidth/CPU cycles on the applications that weren't being actively 
> monitored by just not having the socket server connected to them.
> I think you may be a 'little to close' to the (excellent) application
> you have written to understand the steep learning curve that I see.
> You know the saying, "Brain surgery is easy to a brain surgeon".  I
> should point out that I'm no newbie.  I've used PIL, ReportLab,
> BeautifulSoup, Mechanize, Win32 extensions, ElementTree and a whole
> host of other modules with less difficulty.  Please don't take this as
> anything more than an observation on my part.  From what I see, you
> have written (and generously donated) an extremely powerful library
> and it is greatly appreciated.  It is most likely just me.

Well, I know what you mean. I had troubles to understand that library
either. Logging docs are quite good as a reference, but there is lack
of a good introductory tutorial. Now when I know `logging` I can't live 
without it, but the start wasn't easy.
I shouldn't say it here, but I found helpful docs to the similar
library in Java. ;)

There are many differences (e.g. Appenders vs Handlers), but the rule
is the same.

> As far as the book is concerned, I guess I'd purchase the only copy ;-).

"The Art of Logging" - four volumes. ;-)


More information about the Python-list mailing list