Re: logging question

2015-02-07 Thread Automn
Hello, On 2014-08-13, Arulnambi Nandagoban wrote: > > My pc restarts regularly. Whenever it restarts I lose all the log since it > writes in the file once per day. Is there a way to log information in a > file as soon as it available. You can log in the /var/tmp directory instead of /tmp. The f

Fwd: Re: Logging question

2009-12-16 Thread Vinay Sajip at Red Dove
Original Message Subject:Re: Logging question Date: Tue, 15 Dec 2009 18:28:54 + From: Vinay Sajip at Red Dove To: Yaroslav Molochko On 15/12/2009 14:29, Yaroslav Molochko wrote: > Hello Vinay Sajip, > > my name is Yaroslav, I'm tryi

Re: Logging question

2009-09-23 Thread Vinay Sajip
On Sep 23, 2:46 pm, Jean-Michel Pichavant wrote: > I personally use the following pattern: > > In any submodule moduleA.py of an application: > > import MyApp > _logger =logging.getLogger(MyApp.logger.name + '.moduleA') # attach my > logger to MyApp logger It's also common to use the pattern log

Re: Logging question

2009-09-23 Thread Jean-Michel Pichavant
Gabor Urban wrote: Hi guys, I have embarassing problem using the logging module. I would like to encapsulate the creation and setting up of the logger in a class, but it does not seem working. Here are my relevant parts of the code: -- import sys import logging class LogClass: def __init

Re: Logging question

2009-09-23 Thread Vinay Sajip
On Sep 23, 6:36 am, Gabor Urban wrote: > Hi guys, > > I have embarassing problem using theloggingmodule. I would like to > encapsulate the creation and setting up  of the logger in a class, but > it does not seem working. > > Here are my relevant parts of the code: > > -- [snip] I'm not sure why

Re: Logging question

2009-09-23 Thread Diez B. Roggisch
Gabor Urban schrieb: Hi guys, I have embarassing problem using the logging module. I would like to encapsulate the creation and setting up of the logger in a class, but it does not seem working. Here are my relevant parts of the code: -- import sys import logging class LogClass: def __in