uWSGI loggin format unification
Posted
by
Mediocre Gopher
on Stack Overflow
See other posts from Stack Overflow
or by Mediocre Gopher
Published on 2012-09-02T21:37:08Z
Indexed on
2012/09/02
21:37 UTC
Read the original article
Hit count: 280
I'm attempting to unify the log format of my uwsgi instance. Currently there's three different types of log items:
Sun Sep 2 17:31:00 2012 - spawned uWSGI worker 10 (pid: 2958, cores: 8)
(DEBUG) 2012-09-02 17:31:01,526 - getFileKeys_rpc called
Traceback (most recent call last): File "src/dispatch.py", line 13, in application obj = discovery(env) File "src/dispatch.py", line 23, in discovery ret_obj = {"return":dispatch(method,env)} File "src/dispatch.py", line 32, in dispatch raise Exception("test") Exception: test
The first is an error spawned by uWSGI internally (I have the --log-date option set). The second is from the logging module, which has logging.basicConfig(format='(%(levelname)s) %(asctime)s - %(message)s')
set. The final one is an uncaught exception.
I understand that the uncaught exception probably can't be formatted, but is there some way of having uwsgi use the logging module for its internal logs? Or the other way around?
© Stack Overflow or respective owner