Flask writes some logging lines witout me setting anything special or adding any extra lines, eg:
127.0.0.1 - - [08/Jul/2020 10:24:46] "GET /swaggerui/favicon-32x32.png HTTP/1.1" 200 -
127.0.0.1 - - [08/Jul/2020 10:24:46] "GET /swagger.json HTTP/1.1" 200 -
127.0.0.1 - - [08/Jul/2020 10:24:52] "GET /random_resource/1/1 HTTP/1.1" 404 -
I have been learning the logging module and I want to implement a better logging without having to actually add the log calls everytime:
log.warn('Warning message')
I would like to modify the existing log that is being used and modify it at my will without having to add the calls to the logging in everyline of the module.
EDIT
Using app.logger doesnt solve the issue as it produces a completely different format:
app.logger.info(f"user_id:{request.view_args['user_id']}")
[2020-07-08 11:56:33,894] INFO in __init__: user_id:1