powa-team/powa

How to run in quiet mode while behind httpd

edechaux opened this issue · 4 comments

Hello,
In PoWA documentation there is a sample configuration to run it behind an httpd server.

When using the standalone version, it is possible to use the --logging=warning to disable access logs being printed on the console. I can't find a way to do so with mod_wsgi and the default httpd errorlog get filled with unwanted data like :

[Wed Mar 25 15:56:39 2020] [error] [pid 23494] mod_wsgi.c(1631): [client [I 200325 15:56:39 web:1907] 200 GET /metrics/wait_event_by_databases/?from=2020-03-25+14%3A56%3A39%2B0100&to=2020-03-25+15%3A56%3A39%2B0100 (128.96.81.85) 40.10ms

What can I do ?

Thanks

rjuju commented

Sorry I'm not really familiar with mod_wsgi. I think that what you can do is modify powa.wsgi, and add (probably anywhere would be ok as long as it's reached)

tornado.log.access_log.setLevel(logging.WARNING)

Yes it works but require to import logging for logging.WARNING definition.

rjuju commented
rjuju commented