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

logging question

2014-08-13 Thread Arulnambi Nandagoban
Hello, I posted a question about logger module to create a log file every day. I had a problem recently in logging. 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.

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

Logging question

2009-09-22 Thread Gabor Urban
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__(self, fileName, lo

Re: Python logging question

2009-01-02 Thread koranthala
On Jan 2, 6:21 pm, Vinay Sajip wrote: > On Jan 2, 11:31 am, koranth...@gmail.com wrote: > > >     I am confused reading both together. I will try to explain my > > confusion with an example: > > > basicLogger =logging.getLogger("basic") > > > Class A(): > >   def __init__(self): > >      self.logg

Re: Python logging question

2009-01-02 Thread Vinay Sajip
On Jan 2, 11:31 am, koranth...@gmail.com wrote: > I am confused reading both together. I will try to explain my > confusion with an example: > > basicLogger =logging.getLogger("basic") > > Class A(): > def __init__(self): > self.logger =logging.getLogger("basic.class_a") > >Now, I ma

Python logging question

2009-01-02 Thread koranthala
Hi, I was reading through Python Logging tutorial, and I found one scenario which I couldnt properly understand. The tutorial (http://docs.python.org/library/logging.html) mentions at first that -- "Multiple calls to getLogger() with the same name will return a reference to the same logger

Python Logging question

2008-04-18 Thread tpatch
I am new to Python and I am trying to understand how to utilize the RotatingFileHandler to rollover when the file gets to a certain size. I followed some examples that I have found for setting the size and the number of files. However, I am finding that when the log file gets close to the thre

Re: RotatingFileHandler bugs/errors and a general logging question.

2007-05-10 Thread Vinay Sajip
On May 10, 6:37 pm, [EMAIL PROTECTED] wrote: > On May 9, 12:37 am, Vinay Sajip <[EMAIL PROTECTED]> wrote: > > Our biggest concerns with the network solution is having a single > point of failure and the need for scalability. We could have > potentially thousands of machines doingloggingacross multi

Re: RotatingFileHandler bugs/errors and a general logging question.

2007-05-10 Thread nicholas . petrella
On May 9, 12:37 am, Vinay Sajip <[EMAIL PROTECTED]> wrote: > On May 9, 12:52 am, [EMAIL PROTECTED] wrote:> The infrastructure in which I > am work needs the ability to have log > > files written to from multiple instances of the same script and > > potentially from hundreds or more different machi

Re: RotatingFileHandler bugs/errors and a general logging question.

2007-05-09 Thread Vinay Sajip
On May 9, 12:52 am, [EMAIL PROTECTED] wrote: > The infrastructure in which I am work needs the ability to have log > files written to from multiple instances of the same script and > potentially from hundreds or more different machines. > > I know that the documentation suggests using a networklogg

RotatingFileHandler bugs/errors and a general logging question.

2007-05-08 Thread nicholas . petrella
I am currently trying to use the python logging system as a core enterprise level logging solution for our development and production environments. The rotating file handler seems to be what I am looking for as I want the ability to have control over the number and size of log files that are writt