I suggest SyslogHandler in logging package to centralize all logs .
 http://docs.python.org/library/logging.html#sysloghandler


In my opinion, rotating, parsing, filtering logs is a different task (for a 
sysadmin not a developper). 
I'm doing this for all my projects at work :
 - using SyslogHandler for logging application servers
 - using one syslog server to get all logs from application servers



Le Tue, 18 Jan 2011 23:45:36 -0800,
Chris Rebert <c...@rebertia.com> a écrit :

> On Tue, Jan 18, 2011 at 11:27 PM, Low Kian Seong
> <kianseong....@lcalink.com> wrote:
> > On Jan 19, 2011, at 3:25 PM, Chris Rebert <c...@rebertia.com> wrote:
> >> On Tue, Jan 18, 2011 at 10:02 PM, low kian seong
> >> <kianseong....@logisticsconsulting.asia> wrote:
> >>> Dear people,
> >>> I am currently using concurrentrotatingfilehandler to handle my Python 
> >>> logs.
> >>> The situation is okay when it's only one log, but when it needs to spill
> >>> over to the next log (I configured to have 2) say test.log.2 then I see 
> >>> that
> >>> the output is sort of shared between the first log test.log and 
> >>> test.log.2.
> >>> Am I supposed to concatenate all the logs together to get my logs back ?
> >>> Google hasn't brought back any results, so I am wondering is it just me
> >>> using or reading the resultant logs wrong?
> >>
> >> Since this is apparently a 3rd-party library
> >> (http://pypi.python.org/pypi/ConcurrentLogHandler/ ), have you tried
> >> asking the maintainer? (Who is evidently Lowell Alleman <lowell87
> >> at_sign gmail period com>.) Could very well be a bug.
> >>
> > Actually the default concurrent log handler produces similar results.
> 
> That wouldn't be particularly surprising:
> 
> "15.7.10. Logging to a single file from multiple processes
> 
> Although logging is thread-safe, and logging to a single file from
> multiple threads in a single process is supported, logging to a single
> file from multiple processes is **not** supported [...]"
> -- http://docs.python.org/library/logging.html
> 
> Cheers,
> Chris
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to