Edgewall Software
Modify

Opened 19 years ago

Closed 18 years ago

Last modified 12 years ago

#2747 closed defect (worksforme)

Can't "initenv" with centralized trac.ini logging

Reported by: dserodio@… 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 anonymous, 18 years ago

Same problem here, anyone?

comment:2 by Christian Boos, 18 years ago

Milestone: 0.10
Owner: changed from daniel to Christian Boos

Thanks for the reminder!

comment:3 by Christian Boos, 18 years ago

Resolution: worksforme
Status: newclosed

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!

comment:4 by Christian Boos, 12 years ago

Milestone: 0.10

(clearing report:35)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.