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 configurable to do a doRoll

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 am too much

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 point to. - ro

Re: RotatingFileHandler and logging config file

2005-03-18 Thread news.sydney.pipenetworks.com
Rob Cranfill wrote: news.sydney.pipenetworks.com wrote: You're looking in the wrong place. Try http://docs.python.org/lib/node333.html which isn't quite the page in question, but leads to the closest pertinent page, http://docs.python.org/lib/logging-config-fileformat.html which *still* has noth

Re: RotatingFileHandler and logging config file

2005-03-16 Thread Bengt Richter
On Wed, 16 Mar 2005 20:48:40 -0800, Rob Cranfill <[EMAIL PROTECTED]> wrote: >news.sydney.pipenetworks.com wrote: > >> >> You're looking in the wrong place. Try >> >> http://docs.python.org/lib/node333.html >> > >which isn't quite the page in question, but leads to the closest >pertinent page,

Re: RotatingFileHandler and logging config file

2005-03-16 Thread Rob Cranfill
Peter Hansen wrote: The missing piece of the puzzle might be the connection between the 'args' in the config file and the arguments passed to the __init__ method of the class Yes, I can puzzle out the constructor args ("constructor", heh heh, must be a Java Man) but it's how to get it to do a

Re: RotatingFileHandler and logging config file

2005-03-16 Thread Rob Cranfill
news.sydney.pipenetworks.com wrote: You're looking in the wrong place. Try http://docs.python.org/lib/node333.html which isn't quite the page in question, but leads to the closest pertinent page, http://docs.python.org/lib/logging-config-fileformat.html which *still* has nothing on RotatingFileH

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 self._