0

I have a WSGI server which is served by an Apache proxy. I would like to have a log file dedicated to that server, so I added the following to the VirtualHost declaration:

LogFormat "%h %l %u %t \"%r\" %>s %b" wsgi_server
CustomLog ${APACHE_LOG_DIR}/wsgi_server.log wsgi_server
LogLevel crit

After Apache restarts, I still see some low-level (info? debug?) Log messages in wsgi_server.log:

127.0.0.1 - - [24/Feb/2014:12:16:07 +0000] "GET /image/2014.02.24.10.33.41.540801-4.jpg HTTP/1.1" 200 33895
127.0.0.1 - - [24/Feb/2014:12:16:07 +0000] "GET /image/2014.02.24.10.35.47.666532-3.jpg HTTP/1.1" 200 6665
127.0.0.1 - - [24/Feb/2014:12:16:07 +0000] "GET /image/2014.02.24.10.18.20.501241-9999.jpeg HTTP/1.1" 200 93619
127.0.0.1 - - [24/Feb/2014:12:16:07 +0000] "GET /image/2014.02.24.10.17.54.087584-9999.jpg HTTP/1.1" 200 28088
...

How do I exclude all Log message below crit from my WSGI custom log, and keep only the printouts from the Python WSGI module?

Adam Matan
  • 13,194
  • 19
  • 55
  • 75

1 Answers1

1

The LogLevel directive controls the verbosity of the ErrorLog. That looks like an access log to me so your LogLevel crit won't have any effect on it.

user9517
  • 115,471
  • 20
  • 215
  • 297
  • Thanks. Is there a way to configure my log to be an access log? – Adam Matan Feb 24 '14 at 13:45
  • @AdamMatan: Erm it already is an access log. I don't think that there is much in the way of tuning the verbosity of the access log it's all or nothing so if you don't want it then don't define a CustomLog. – user9517 Feb 25 '14 at 14:21