Python logging doesn't create directories

Bug #397111 reported by Michael Gorven
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ibid
Fix Released
Medium
Michael Gorven

Bug Description

The infamous startup error "No such file or directory: 'logs/ibid.log'" is due
to Python logging assuming that directories exist. We need to solve this one
way or another. The options are:

1. Parse the logging config and try to identify logfiles
2. Introspect the logging handlers once the config has been loaded and
identify logfiles
3. Handle the default configuration of logs/ibid.log

 affects ibid
 milestone 0.1

Revision history for this message
Michael Gorven (mgorven) wrote : Re: [Bug 397111] [NEW] Python logging doesn't create directories

> 2. Introspect the logging handlers once the config has been loaded and
> identify logfiles

This won't work since the exception occurs during the fileConfig() call.

Revision history for this message
Stefano Rivera (stefanor) wrote :

Pity. I'd have voted for 2. I'm not sure I understand exactly what you mean by 3, so do whatever you think is best :)

Revision history for this message
Michael Gorven (mgorven) wrote :

 assignee mgorven
 status inprogress

Michael Gorven (mgorven)
Changed in ibid:
assignee: nobody → Michael Gorven (mgorven)
status: New → In Progress
Revision history for this message
Michael Gorven (mgorven) wrote : Re: [Bug 397111] Re: Python logging doesn't create directories

On Wednesday 08 July 2009 22:38:13 Stefano Rivera wrote:
> Pity. I'd have voted for 2. I'm not sure I understand exactly what you
> mean by 3, so do whatever you think is best :)

Just assume that we need a subdirectory called "logs".

Revision history for this message
Michael Gorven (mgorven) wrote :

 importance medium

Changed in ibid:
importance: Undecided → Medium
Revision history for this message
Michael Gorven (mgorven) wrote :

 status fixreleased

Changed in ibid:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.