#2747: Can't "initenv" with centralized trac.ini logging
--------------------------------+-------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: daniel
Type: defect | Status: new
Priority: normal | Milestone:
Component: trac-admin | Version: devel
Severity: normal | Keywords:
--------------------------------+-------------------------------------------
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.[[BR]]
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
}}}
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/2747>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets