On Thu, Sep 30, 2010 at 5:03 PM, Nate Coraor <nate@bx.psu.edu> wrote:
Peter wrote:
Hi all,
For our production server we are using rsyslog for centralised logging, http://www.rsyslog.com/
Galaxy is using "import logging" which can output to rsyslog, using SysLogHandler rather than StreamHandler or FileHandler. Based on grep'ing the source code Galaxy doesn't support this yet. I could probably add it but it isn't clear to me where this would be done... functions configure_logging() in lib/galaxy/config.py and in lib/galaxy/webapps/community/config.py look like strong possibilities but both allow for some global_conf_parser override (and I'm not sure what that does).
Has anyone looked at modifying this area before, or could offer some tips?
Hi Peter,
You can actually override the logging directly in universe_wsgi.ini. Create some new sections that look something like these:
[loggers] keys=root,paste
[handlers] keys=syslog
[formatters] keys=default
[logger_root] level=DEBUG handlers=syslog
[logger_paste] qualname=paste.httpserver.ThreadPool level=WARN handlers=syslog
[handler_syslog] class=logging.handlers.SysLogHandler level=NOTSET formatter=default args=(('syslog_server_ip',514),'syslog_facility')
[formatter_default] format=%(name)s %(levelname)s %(asctime)s %(message)s
--nate
Excellent - that should be perfect. This must be handled by the global_conf_parser override code which I hadn't traced. Thanks. Peter P.S. Is this on the wiki somewhere?