#2747 closed defect (worksforme)
Can't "initenv" with centralized trac.ini logging
| Reported by: | Owned by: | Christian Boos | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | admin/console | Version: | devel |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
I have several Trac environments, and I prefer to keep most of their configuration centralized in the "central" TracIni (/usr/share/trac/conf/trac.ini). The [logging] section is configured in this file. I have patched my db_default.py so it doesn't add the settings in the "central" TracIni (including the [logging] section) to the newly-created Trac environments.
I've just updated my Trac installation to trunk (r2893), and when I tried to create a new environment (called lixo) with initenv, I got the following error:
Failed to create environment. [Errno 2] No such file or directory: '/var/lib/trac/lixo/log/trac.log'
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 584, in do_initenv
options=options)
File "/usr/lib/python2.3/site-packages/trac/env.py", line 79, in __init__
self.setup_log()
File "/usr/lib/python2.3/site-packages/trac/env.py", line 230, in setup_log
self.log = logger_factory(logtype, logfile, loglevel, logid)
File "/usr/lib/python2.3/site-packages/trac/log.py", line 26, in logger_factory
hdlr = logging.FileHandler(logfile)
File "/usr/lib/python2.3/logging/__init__.py", line 694, in __init__
StreamHandler.__init__(self, open(filename, mode))
IOError: [Errno 2] No such file or directory: '/var/lib/trac/lixo/log/trac.log'
Failed to initialize environment. 1
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 588, in do_initenv
sys.exit(1)
SystemExit: 1
Attachments (0)
Change History (4)
comment:1 by , 19 years ago
comment:3 by , 19 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
Hm, I was about to write a patch for this, but it looks like it's already fixed for 0.10, so … time to upgrade!



Same problem here, anyone?