How to write seperate log files for different log levels in python flask application using the logging module?
Asked
Active
Viewed 43 times
0
-
https://stackoverflow.com/questions/11232230/logging-to-two-files-with-different-settings#11233293 This should have your question covered. – marxmacher Jan 27 '20 at 11:40
-
will it be possible to do with same object, but just by passing different level of logs the files to write on gets seperated? – Koustav Chanda Jan 27 '20 at 11:46
-
def setup_logger(name, log_file, level=logging.INFO): you can set the third parameter level to other logging levels. – marxmacher Jan 27 '20 at 11:47