Mediocre Gopher
Mediocre Gopher

Reputation: 2304

uWSGI logging format unification

I'm attempting to unify the log format of my uwsgi instance. Currently there's three different types of log items:

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?

Upvotes: 1

Views: 1864

Answers (1)

roberto
roberto

Reputation: 12933

You have to use uWSGI 1.3 and set the 'python' logger, with

--logger python

Upvotes: 1

Related Questions