Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10441 closed defect (wontfix)

Trac syslog logger prefixes program name with U+FEFF byte-order mark, doesn't seem right

Reported by: lkraav <leho@…> Owned by:
Priority: normal Milestone:
Component: general Version: 0.12.2
Severity: normal Keywords: logging
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

it should be possible to filter Trac with a sane syslog configuration entry like:

...
filter f_trac       { program("^Trac"); }
...

to my surprise this didn't capture traffic into a separate log file, while tailing /var/log/messages didn't show anything suspicious.

it was less, who showed me that this U+FEFF marker is placed in front of every Trac syslog entry.

...
<U+FEFF>Trac[project:env] INFO: -------------------------------- environment startup [Trac 0.12.2] --------------------------------
...

i'm following wiki instructions:

[logging]
log_format = Trac[$(basename)s:$(module)s] $(levelname)s: $(message)s

this marker seems to be in the wrong place at the wrong time and should be eliminated. thoughts?

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 12 years ago

Resolution: wontfix
Status: newclosed

(while on the train of #10538 ;-) )

I didn't comment yet because I wasn't sure I found the proper authoritative document on this, but from what I recall, all seem to indicate that Python logging system does the right thing. See in particular python-issue:7077#msg94141 (well, Python 2.7.1 at least: http://hg.python.org/cpython/file/v2.7.1/Lib/logging/handlers.py#l782).

And yes, that's what the RFC:5424#section-6.4 says… so I guess you have to see how your filtering program can represent this BOM!

Not much we could do in Trac anyway, besides monkey-patching logging, which we won't do.

comment:2 by lkraav <leho@…>, 12 years ago

Thanks for clearing this up cboos. This turned out to be an unexpected development (design, not bug! lol) but I guess I have some clues now to look for how smarter folks have solved this.

comment:4 by Christian Boos, 12 years ago

Thanks for the link! This means the next version of Python (2.7.4) will have the fix (http://hg.python.org/cpython/rev/af46a001d5ec).

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.