[issue9512] logging.handlers.RotatingFileHandler - mode argument not respected

2010-08-23 Thread Friðrik Már Jónsson
Friðrik Már Jónsson added the comment: That's a fair conclusion, but in this case I'd appreciate Terry's suggested doc patch being implemented: DOC PATCH In 15.6.12.5. RotatingFileHandler, replace "If mode is not specified, 'a' is used." with "If mode is not specified or if maxBytes > 0, the m

[issue9512] logging.handlers.RotatingFileHandler - mode argument not respected

2010-08-22 Thread Vinay Sajip
Vinay Sajip added the comment: The rotating handlers provided with the logging package are expected to be simple append-only handlers; if you need more specialised behaviour you need to subclass and implement what you need. The ELFF is about request logging, not application logging. Using th

[issue9512] logging.handlers.RotatingFileHandler - mode argument not respected

2010-08-22 Thread Friðrik Már Jónsson
Friðrik Már Jónsson added the comment: I agree with your points on the triviality and potential harmfulness of allowing modes like 'b' and 'w'. The '+' mode may be required for loggers that require headers or validation or positioning within an existing file (think XML). One example of such a

[issue9512] logging.handlers.RotatingFileHandler - mode argument not respected

2010-08-22 Thread Vinay Sajip
Changes by Vinay Sajip : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue9512] logging.handlers.RotatingFileHandler - mode argument not respected

2010-08-22 Thread Vinay Sajip
Vinay Sajip added the comment: I've updated the comment to be more informative in py3k, release27-maint (r84259). -- status: pending -> open ___ Python tracker ___ _

[issue9512] logging.handlers.RotatingFileHandler - mode argument not respected

2010-08-22 Thread Vinay Sajip
Vinay Sajip added the comment: Sorry for the slow response, I've been on vacation. The reason why the mode is set to "a" for rotating file handlers is as follows: the file is supposed to contain events from multiple runs of the program until rollover occurs. If a mode "w" (for example) is spe

[issue9512] logging.handlers.RotatingFileHandler - mode argument not respected

2010-08-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Given that you decided to argue for a code change (which my comment implicitly invited), adding someone (VS in this case) to nosy to respond is the right thing to do and fairly common. Assigning to someone is not, as least not any more. If someone agrees to c

[issue9512] logging.handlers.RotatingFileHandler - mode argument not respected

2010-08-05 Thread Friðrik Már Jónsson
Friðrik Már Jónsson added the comment: It may not have been entirely obvious that what I meant with the Extended Log File Format example is that read access would be optimal. -- ___ Python tracker _

[issue9512] logging.handlers.RotatingFileHandler - mode argument not respected

2010-08-05 Thread Friðrik Már Jónsson
Friðrik Már Jónsson added the comment: Thank you. I should have been more clear about what I meant. This this condition was introduced in r38631 by Vinay Sajip having the log message "Added optional encoding argument to file handlers." I can't easily see why this piece of code is necessary, wh

[issue9512] logging.handlers.RotatingFileHandler - mode argument not respected

2010-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I presume your report is about the fact that the mode is 'a' even though you specified 'a+'. The answer is this block from RotatingFileHandler.__init__ (3.1.2, but presume same for 2.x): if maxBytes > 0: mode = 'a' # doesn't make sense othe

[issue9512] logging.handlers.RotatingFileHandler - mode argument not respected

2010-08-04 Thread Friðrik Már Jónsson
New submission from Friðrik Már Jónsson : It seems to me that the ``mode`` keyword argument of ``logging.handlers.RotatingFileHandler`` is not respected. Here is an example of opening a nonexistent file:: Python 2.7 (r27:82500, Aug 4 2010, 15:10:49) [GCC 4.3.2] on linux2 Type "help