This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author groodude
Recipients
Date 2004-06-29.16:34:21
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
When using the RotatingFileHandler class, if the
working directory is changed after the logging is setup
and a relative file name has been used to set up the
handler, python will crash when a rollover is attempted.
In my application, I set up the logger first (using a
config file) and then I start reading the config file
for the application. This is done so that I can log any
errors found within the application config file.
However, if a certain option is set, then the
application has to change the working directory. But
since the file name that I have included is relative,
when the logger attempts to rollover the file, it
crashes since the log file can no longer be found
within the current directory. 

Is this the desired behaviour (i.e. does the logger
expect to have absolute paths)? If so, this would be a
good thing to add to the documentation (along with an
example of a RotatingFileHandler configuration in
section 6.28.7.2).
It seems to make more sense that when a file name is
passed in, the absolute path be stored.

Even if this is the desired behaviour, I think that an
example of the RotatingFileConfig handler should be
included in the configuration section, complete with
values for the maxbytes and the number of back ups.
History
Date User Action Args
2007-08-23 14:23:04adminlinkissue982049 messages
2007-08-23 14:23:04admincreate