Modify ↓
Opened 14 years ago
Last modified 11 years ago
#8919 new enhancement
Relative path name to Log file
Reported by: | anonymous | Owned by: | izzy |
---|---|---|---|
Priority: | low | Component: | LogViewerPlugin |
Severity: | minor | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
I've compiled this plugin to work with 0.12 and it is working so far. The only issue that arose is a relative path name specified for the log file brings up an IOError.
Setting the logfile path name to an absolute path seems to be working now.
Attachments (0)
Note: See
TracTickets for help on using
tickets.
I've just checked, and my
trac.ini
has a very relative path (none to be true:log_file = trac.log
). In this case, LogViewer takes the path to the project from the environment, and adds alog
to it.What you could try (and let me know if it works): in
api.py
after line 16, please insert:To give you the context:
So that should do:
if not fpath:
if only a file name is given, look for it in thelog
subdirectory of the project's Trac environmentif fpath and not os.path.exists(fpath):
if there was a path specified which does not exist, assume it's relative to the project's pathPlease let me know whether that worked out. And sorry that it took me so long to respond!