Google StackDrive Logging Level in containers with uwsgi always at Error Level

Viewed 1223

I'm deploying via Kuberenetes come containers on Google Cloud, which are django project and uwsgi to run them.

I'm using the stackdrive logging tool to see the logging, the problem is that all the entries are seen as severity ERROR even thought they are not error. It seems that the log of uwsgi is written to stderr or something like that.

In the picture you can see that django uses INFO level, but that is received as ERROR by stackdrive.

enter image description here

this is how i set up uwsgi.

[uwsgi] master = true socket = :3031 chdir = . wsgi-file = docker.wsgi processes = 4 threads = 2 socket-timeout = 90 harakiri = 90 http = :8000 env = prometheus_multiproc_dir=multi enable-threads = yes lazy-apps = yes pidfile=/tmp/project-master.pid

2 Answers

This answer helped me find the solution to this. Using the option logger-req=stdio uWSGI logs get the correct level in Stackdriver.

Example of uwsgi.ini:

[uwsgi]
logger-req=stdio
Related