Re: RotatingFileHandler Fails

2012-03-07 Thread arun1
Hi, Actually NonInheritedRotatingFileHandler is rotating the log files but some times it falis and showing I/O errors while the log file limit reaches the given size. Thanks Arun -- View this message in context: http://python.6.n6.nabble.com/RotatingFileHandler-Fails-tp4542769p4554781.html

Re: RotatingFileHandler Fails

2012-03-07 Thread arun1
Hi nac, NTSafeLogging.py is working fine without any errors, but its not rotating the log files as rotatingfilehandler does. Do you have any working sample with NTSafeLogging which rotates the log file. logging issue with subprocess.Popen can be solved using this code import threading lock

Re: RotatingFileHandler Fails

2012-03-05 Thread nac
On Mar 5, 4:27 am, Jean-Michel Pichavant wrote: > nac wrote: > > The RotatingFileHandler running on win 7 64-bit; py 2.7 is failing > > when the script launches a process using subprocess.Popen. Works fine > > if the subprocess is not launched > > > The exception thr

Re: RotatingFileHandler Fails

2012-03-05 Thread Jean-Michel Pichavant
nac wrote: The RotatingFileHandler running on win 7 64-bit; py 2.7 is failing when the script launches a process using subprocess.Popen. Works fine if the subprocess is not launched The exception thrown Traceback (most recent call last): File "C:\Python27\lib\logging\handlers.py", l

RotatingFileHandler Fails

2012-03-03 Thread nac
The RotatingFileHandler running on win 7 64-bit; py 2.7 is failing when the script launches a process using subprocess.Popen. Works fine if the subprocess is not launched The exception thrown Traceback (most recent call last): File "C:\Python27\lib\logging\handlers.py", line 7

Re: RotatingFileHandler key error when parsing a logging config file

2009-12-22 Thread Vinay Sajip
On Dec 21, 9:33 pm, jordilin wrote: > Hi, >  I've a config forloggingwhere I set up a file rotation with > handlers.RotatingFileHandler and when the app parses thelogging > config it says keyError when trying to parse that section > ('RotatingFileHandler' is not def

Re: RotatingFileHandler key error when parsing a logging config file

2009-12-22 Thread Jean-Michel Pichavant
jordilin wrote: Hi, I've a config for logging where I set up a file rotation with handlers.RotatingFileHandler and when the app parses the logging config it says keyError when trying to parse that section ('RotatingFileHandler' is not defined). Curiously enough, I can do import l

RotatingFileHandler key error when parsing a logging config file

2009-12-21 Thread jordilin
Hi, I've a config for logging where I set up a file rotation with handlers.RotatingFileHandler and when the app parses the logging config it says keyError when trying to parse that section ('RotatingFileHandler' is not defined). Curiously enough, I can do import logging and from l

Re: RotatingFileHandler issue

2009-10-14 Thread Max Lynch
I never got a response back from this, but I'm noticing even more odd behavior, see inline: On Wed, Sep 30, 2009 at 4:38 PM, Max Lynch wrote: > Hi. > I have a RotatingFileHandler for my logging system. I have it set to > rotate once the file becomes 5MB in size. Here is the co

RotatingFileHandler issue

2009-09-30 Thread Max Lynch
Hi. I have a RotatingFileHandler for my logging system. I have it set to rotate once the file becomes 5MB in size. Here is the conf line I have in my logging config file: [handler_fileHandlerDebugNoRequest] class=handlers.RotatingFileHandler formatter=formatterNoRequest args=('/web

Re: RotatingFileHandler - ShouldRollover error

2008-04-19 Thread Gabriel Genellina
En Wed, 16 Apr 2008 10:50:44 -0300, <[EMAIL PROTECTED]> escribió: > I am using the RotatingFileHandler logger with Python 2.5 on Windows and > I am getting an error on the rollover. When the log file gets close to > the size where it needs to rollover, I start getting the

RotatingFileHandler - ShouldRollover error

2008-04-16 Thread tpatch
I am using the RotatingFileHandler logger with Python 2.5 on Windows and I am getting an error on the rollover. When the log file gets close to the size where it needs to rollover, I start getting the following error for every log message. Does anyone have a solution to this problem

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

Re: RotatingFileHandler + subprocess module problems

2007-01-15 Thread Stephen Hansen
That was perfect-- it now all behaves as it should. Thanks! On 1/11/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: At Thursday 11/1/2007 15:59, Stephen Hansen wrote: >If I run app1, and then app2, it all works fine. Specifically, the >apps are logging correctly and I can see with Process Exp

Re: RotatingFileHandler + subprocess module problems

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 15:59, Stephen Hansen wrote: If I run app1, and then app2, it all works fine. Specifically, the apps are logging correctly and I can see with Process Explorer that each has a handle to the appropriate files. However, I have a setting to make App2 run App1 in the backgrou

RotatingFileHandler + subprocess module problems

2007-01-11 Thread Stephen Hansen
Hey, there. I'm currently having a problem with what *looks* like an interaction between using subprocess and RotatingFileHandler. This is on Windows with Python 2.3 I have two console applications: app1 and app2. For most of app2 to function properly, app1 must already be running. App1

RotatingFileHandler Error

2006-12-28 Thread Roopesh
Hi I am trying to use RotatingFileHandler, in the foll way : rootLogger = logging.getLogger('') rootLogger.setLevel(logging.DEBUG) rotatingHandler = logging.handlers.RotatingFileHandler(self.logobj_path.name,"a", 1000, 10) rotatingHandler.doRollover() rotatingHandler.emit() r

Re: logging error with RotatingFileHandler

2006-07-02 Thread Vinay Sajip
flupke wrote: > > -> The rename fails for some reason. I would dig a little deeper to find out what the reason is. After all, on the face of it, there's no obvious reason it should fail. The "permission denied" indicates perhaps that some other process or thread is keeping that file open? I've

Re: logging error with RotatingFileHandler

2006-06-30 Thread flupke
File "C:\Python24\lib\atexit.py", line 24, in _run_exitfuncs > func(*targs, **kargs) > File "C:\Python24\lib\logging\__init__.py", line 1333, in shutdown > h.close() > File "C:\Python24\lib\logging\__init__.py", line 772, in close > Stre

Re: logging error with RotatingFileHandler

2006-06-30 Thread flupke
Vinay Sajip schreef: > flupke wrote: > >> If this bug is fixed, where will i find a fixed version and how do i >> install it? >> Also, more important to me, what am i doing wrong to get this error >> message in the first place? > > You're not doing anything particularly wrong, though it's not exa

Re: logging error with RotatingFileHandler

2006-06-29 Thread Vinay Sajip
flupke wrote: > If this bug is fixed, where will i find a fixed version and how do i > install it? > Also, more important to me, what am i doing wrong to get this error > message in the first place? You're not doing anything particularly wrong, though it's not exactly good practice to call fileCo

Re: logging error with RotatingFileHandler

2006-06-27 Thread flupke
self.log.debug("Starting class B") for nr_of_lognr in range(0,2000): b = TypeB() b.dolog("This is a test to see if logging works and more specifically the RotatingFileHandler functionallity") It seemed as if the "logging.config.fileConfig(LOGFILE)" li

Re: logging error with RotatingFileHandler

2006-06-27 Thread Vinay Sajip
flupke wrote: > File "C:\Python24\lib\logging\handlers.py", line 134, in doRollover > self.handleError(record) > NameError: global name 'record' is not defined There's a bug in doRollover's exception handling, which is masking the true error - which is most probably an exception being throw

logging error with RotatingFileHandler

2006-06-25 Thread flupke
Hi, i'm getting errors with the log module concerning RotatingFileHandler. I'm using Python 2.4.3 on Windows XP SP2. This used to work in previous python versions but since i upgraded to 2.4.3 i get these errors: Traceback (most recent call last): File "C:\Python24\lib\logg

Re: FOLLOW-UP how to use RotatingFileHandler

2006-02-13 Thread Peter Hansen
john peter wrote: > the fix was to specify handler.RotatingFileHandler > > does RotatingFileHandler work with Windows XP? Yes. -- http://mail.python.org/mailman/listinfo/python-list

Re: FOLLOW-UP how to use RotatingFileHandler

2006-02-13 Thread john peter
the fix was to specify handler.RotatingFileHandler   does RotatingFileHandler work with Windows XP? john peter <[EMAIL PROTECTED]> wrote:Hi!   I have the following logging.conf : [loggers]keys=root   [handlers]keys=roth   [formatters]keys=simpleFormatter   [logger_root

how to use RotatingFileHandler

2006-02-13 Thread john peter
1>python sampleLogging.pyTraceback (most recent call last):  File "C:\Python24\lib\logging\config.py", line 157, in fileConfig    log.addHandler(handlers[hand])KeyError: 'roth'No handlers could be found for logger "root"   when i did a help(logging) on the logging module, i

Re: RotatingFileHandler in Python 2.3.5

2005-05-16 Thread Vinay Sajip
new pip gmail.com> writes: > > Is the RotatingFileHandler (from the logging module) available in > Python 2.3.5? I'm getting a "AttributeError: 'module' object has no > attribute 'RotatingFileHandler'" error message when trying to use it. The

RotatingFileHandler in Python 2.3.5

2005-05-16 Thread new pip
Is the RotatingFileHandler (from the logging module) available in Python 2.3.5? I'm getting a "AttributeError: 'module' object has no attribute 'RotatingFileHandler'" error message when trying to use it. Thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: RotatingFileHandler and logging config file

2005-03-20 Thread Vinay Sajip
Rob Cranfill wrote: NID (No, It Doesn't) ;-) but thanks anyway. To reiterate, the question is how to make RotatingFileHandler do a doRotate() on startup from a *config file*. No mention of that in what you point to. I don't think that RotatingFileHandler *should* be configurab

Re: RotatingFileHandler and logging config file

2005-03-19 Thread Peter Hansen
Rob Cranfill wrote: Ah, now *there's* an intriguing approach! I am too much a Python noob to know - can I subclass RFH and then invoke that new class from a config file (the crux of my original question) ? I may play around with it today There's at least one way that will work, though it ma

Re: RotatingFileHandler and logging config file

2005-03-19 Thread Rob Cranfill
news.sydney.pipenetworks.com wrote: Yeah...sorry about that. I misunderstood what node333.html was used for. Looks like your best bet may be to extend the RotatingFileHandler directly in the handlers module and call doRollover() in __init__. Ah, now *there's* an intriguing approach! I a

Re: RotatingFileHandler and logging config file

2005-03-19 Thread Rob Cranfill
Bengt Richter wrote: The first hit is http://docs.python.org/lib/node332.html HTH NID (No, It Doesn't) ;-) but thanks anyway. To reiterate, the question is how to make RotatingFileHandler do a doRotate() on startup from a *config file*. No mention of that in what you poi

Re: RotatingFileHandler and logging config file

2005-03-18 Thread news.sydney.pipenetworks.com
still* has nothing on RotatingFileHandler. Yeah...sorry about that. I misunderstood what node333.html was used for. Looks like your best bet may be to extend the RotatingFileHandler directly in the handlers module and call doRollover() in __init__. Huy -- http://mail.python.org/mailman/listinfo/python-list

Re: RotatingFileHandler and logging config file

2005-03-16 Thread Bengt Richter
age in question, but leads to the closest >pertinent page, > http://docs.python.org/lib/logging-config-fileformat.html >which *still* has nothing on RotatingFileHandler. > >That's OK, I've given up on the idea of being able to configure a >RotatingFileHandler

Re: RotatingFileHandler and logging config file

2005-03-16 Thread Rob Cranfill
7;s how to get it to do a doRollover() that's in question. No sign of support for it in the docs (which your link to doesn't elucidate RotatingFileHandler any better than my original) but that's OK, see my following message to <[EMAIL PROTECTED]> (what a funny name!)

Re: RotatingFileHandler and logging config file

2005-03-16 Thread Rob Cranfill
nothing on RotatingFileHandler. That's OK, I've given up on the idea of being able to configure a RotatingFileHandler from a config file; I'll do it in my code as a default, and if users want any *other* behavior, they can config *that*. - rob -- http://mail.python.org/mailman/listinfo/python-list

Re: RotatingFileHandler and logging config file

2005-03-16 Thread news.sydney.pipenetworks.com
Rob Cranfill wrote: Kent Johnson wrote: It is in the latest docs. Kent No, it isn't. (But thanks for replying anyway!) http://docs.python.org/lib/logging-config-fileformat.html You're looking in the wrong place. Try http://docs.python.org/lib/node333.html Huy -- http://mail.python.org/mailman/

Re: RotatingFileHandler and logging config file

2005-03-15 Thread Peter Hansen
Rob Cranfill wrote: Kent Johnson wrote: It is in the latest docs. No, it isn't. (But thanks for replying anyway!) Can you prove it isn't? ;-) http://docs.python.org/lib/logging-config-fileformat.html has all the others (OK, maybe not all, I haven't thoroughly checked, but it's got nine of 'em)

Re: RotatingFileHandler and logging config file

2005-03-15 Thread Rob Cranfill
Kent Johnson wrote: It is in the latest docs. Kent No, it isn't. (But thanks for replying anyway!) http://docs.python.org/lib/logging-config-fileformat.html has all the others (OK, maybe not all, I haven't thoroughly checked, but it's got nine of 'em) but nothing for RFH. Or is that not "the la

Re: RotatingFileHandler and logging config file

2005-03-15 Thread Kent Johnson
Rob Cranfill wrote: [BTW, has anyone else noticed that RotatingFileHandler isn't documented in the docs? All the other file handlers have at least a paragraph on their options, but nothing for RFH!] It is in the latest docs. Kent -- http://mail.python.org/mailman/listinfo/python-list

RotatingFileHandler and logging config file

2005-03-14 Thread Rob Cranfill
Hello, I've successfully coded Python to do what I want with a RotatingFileHandler, but am having trouble getting the same behavior via a config file. I wanted to create one log file each time I run my app, with up to 10 files kept from the last invocations. This was accomplished with

Re: RotatingFileHandler

2004-12-03 Thread Kamus of Kadizhar
On Fri, 03 Dec 2004 09:40:07 +, Vinay Sajip wrote: > Of course, you should not normally be calling emit() from user code. The > correct approach is to log events to loggers, and not emit them to > handlers directly. Thanks, I finally got that figured out. Lots changed between the time I

Re: RotatingFileHandler

2004-12-03 Thread Vinay Sajip
Robert Brewer wrote: Kamus of Kadizhar wrote: I'm having a problem with logging. I have an older app that used the RotatingFileHandler before it became part of the main distribution (I guess in 2.3). [snip] The offending snippet of code is: logFile = logging.handlers.RotatingFileHandler(

RE: RotatingFileHandler

2004-12-02 Thread Robert Brewer
Kamus of Kadizhar wrote: > I'm having a problem with logging. I have an older app that used the > RotatingFileHandler before it became part of the main distribution (I > guess in 2.3). > > It worked fine then. Now I get: > > [EMAIL PROTECTED] bin]# ./mplayer.py fi

RotatingFileHandler

2004-12-02 Thread Kamus of Kadizhar
I'm having a problem with logging. I have an older app that used the RotatingFileHandler before it became part of the main distribution (I guess in 2.3). It worked fine then. Now I get: [EMAIL PROTECTED] bin]# ./mplayer.py file://test.avi //test.avi Traceback (most recent call last):