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