I assume that you are using a flash development server.
The flag development server is based on werkzeug , whose WSGIRequestHandler , in turn, is based on BaseHTTPServer in the standard lib library.
As you have noticed, WSGIRequestHandler overrides the logging methods log_request , log_error and log_message to use this own logging.Logger - so you can simply override it as you like in the spirit of Ijad's response.
If you go down this route, I think it would be easier to add your own FileHandler , and separate the output from stdout and stderr using a filter
Please note, however, that all this is very implementation specific - in fact, there is no proper interface for doing what you want .
Although this concerns your actual question, I feel that I really have to ask - why are you worried about what is included in each log on the development server ?
If you encounter such a problem, should you not run a real web server already ?
source share