Opened 12 years ago
Closed 12 years ago
#10815 closed defect (wontfix)
tracebacks within syslog are not using "trac" as the syslog application name
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | web frontend | Version: | 0.12.3 |
Severity: | minor | Keywords: | syslog |
Cc: | leho@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I'm running trac within Apache and mod_wsgi using daemon mode. Looking in my messages/syslog file, I found the following logged traceback:
Aug 16 10:33:57 myhost Trac[myinstance:api] WARNING: HTML preview using EnscriptRenderer failed: Aug 16 10:33:57 myhost Traceback (most recent call last): Aug 16 10:33:57 myhost File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.3-py2.6.egg/trac/mimeview/api.py", line 766, in render Aug 16 10:33:57 myhost rendered_content, filename, url) Aug 16 10:33:57 myhost File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.3-py2.6.egg/tracopt/mimeview/enscript.py", line 147, in render Aug 16 10:33:57 myhost raise Exception(err) Aug 16 10:33:57 myhost Exception: Running enscript failed with (127, sh: enscript: not found), disabling EnscriptRenderer (command: 'enscript --color -h -q --language=html -p - -Epython')
Note that only the first line has a "Trac[myinstance:api]" syslog application prefix. The following lines respectively have syslog application as "Traceback", "File", "rendered_content", "File", "raise", and "Exception". Without the correct syslog application, categorizing these log messages using log processing scripts becomes difficult.
Please either prefix all traceback messages with "Trac" so I can identify their origin programmatically, or allow me to configure tracebacks to be sent somewhere other than syslog.
How to reproduce
- configure Trac to log to syslog
- raise a Trac exception
- look in syslog for the stacktrace, which is missing "Trac" as a syslog appliction name
System information
- Ubuntu 10.04.4 (LTS/Lucid)
- Python 2.6.5 (Ubuntu package 2.6.5-1ubuntu6)
- Apache 2, using apache2-mpm-worker (Ubuntu package 2.2.14-5ubuntu8.9)
- libapache2-mod-python (Ubuntu package 3.3.1-8ubuntu2)
- libapache2-mod-wsgi (Ubuntu package 2.8-2ubuntu1)
- Trac 0.12.3 (Python egg, configured as WSGIDaemonProcess processes=2 threads=15)
Attachments (0)
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Cc: | added |
---|
comment:3 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
It's even a syslog-ng only issue, according to Python-issue:6444.
Look for the no-multi-line flags (since 3.2) and the indent-multi-line function (since 3.3). Maybe that could do the trick.
If this is happening with another system than syslog-ng, mentioning it on the python issue 6444 could be useful.
Trac is using the stock
logging
module from Python, and I suspect this is a bug (or a limitation) of that system.