Edgewall Software
Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#10296 closed defect (worksforme)

Trac log too big, but no useful error

Reported by: edward.b.matheson@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.12.2
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

So I have discovered this whilst using a plugin, but I believe it's an issue that will need to be dealt with in Trac core.

  • email2trac uses a mail alias pipe to open run its script. This gets the trac env by using:
       env = Environment(settings['project'], create=0)
            except IOError, detail:
                logger.error("Trac project does not exists: %s" %settings['project'])
                sys.exit(0)
    
    This has been dying with the error posted, but nothing more useful. After much research and testing I found that trac was dying because it couldn't open the error log because it was too big. I found this using strace. It's rather a catch-22 .. but perhaps if it dies .. kick out an error on STDERR so that the issue can be more readily found.

Attachments (0)

Change History (3)

comment:1 by Remy Blank, 13 years ago

Resolution: worksforme
Status: newclosed

There are at least two solutions to this issue:

  • Log to syslog, and let your logger deal with it.
  • Use a program like logrotate to avoid the log getting too big.

If anything, then Python's logging framework should be improved, as that's what Trac is using.

in reply to:  1 comment:2 by Christian Boos, 13 years ago

Replying to rblank:

… If anything, then Python's logging framework should be improved, as that's what Trac is using.

Well, it can already do more than what we're currently asking it to do ;-) For example, setting limits on log size and rotation could already be supported (RotatingFileHandler).

comment:3 by Christian Boos, 13 years ago

I just remembered there's even #6226, which has a patch implementing this. Some testing and feedback would be welcome there.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.