Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#2763 closed defect (fixed)

Add date to Trac's log

Reported by: dserodio@… Owned by: Christian Boos
Priority: normal Milestone: 0.10
Component: general Version: 0.9.3
Severity: trivial Keywords: logging
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Currently, Trac log file is in the following format:

16:07:52 Trac[api] DEBUG: Updating wiki page index/Maglor/

The log file should also contain the date of the log messages, preferrably in ISO -8601 format, like:

2006-02-15 16:07:52 Trac[api] DEBUG: Updating wiki page index/Maglor/

Attachments (0)

Change History (7)

comment:1 by anonymous, 18 years ago

Yes, please, this would be most useful.

comment:2 by whiglyric@…, 18 years ago

In log.py, the date/time is formatted using %(asctime)s, which according to the Python documentation should include the date in the string by default. My system showed only the time, though. I added from datetime import datetime to the top of log.py, then rebuilt, and now the log file displays the date.

comment:3 by Christian Boos, 18 years ago

Milestone: 0.10
Owner: changed from Jonas Borgström to Christian Boos

comment:4 by Christian Boos, 18 years ago

Resolution: worksforme
Status: newclosed

Well actually I have the date right now, without the change (Linux w/Python 2.4, Windows w/Python 2.3 and 2.4, for both trunk and 0.9-stable).

Please reopen if this doesn't work for you for some reason on 0.10dev.

comment:5 by Christian Boos, 18 years ago

Keywords: logging added
Resolution: worksforme
Status: closedreopened

Sorry, my mistake, I thought it worked for me…

comment:6 by Christian Boos, 18 years ago

Severity: normaltrivial

In [3171], the full time is shown even in DEBUG mode, as requested here.

I'll check the above on Unix, to see if there's a need to add the date information for syslog type, or if that's done automatically by the system, like on Windows using the winlog mode.

comment:7 by Christian Boos, 18 years ago

Resolution: fixed
Status: reopenedclosed

Adding the date information for the file and stderr types was enough: there's no need to add the date for the syslog type, it's done by the system.

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.