2 Answers
- Newest
- Most votes
- Most comments
0
Could you please try with the following piece of code:
self.logger.setLevel(logging.DEBUG) ... console_handler = logging.StreamHandler(sys.stdout) console_handler.setLevel(logging.DEBUG)
Thank you :)
answered 7 months ago
0
I tried this with sys.stdout. But this print all the log levels on both output log and error log. I want to print logger.info() into output log and logger.error() in error log. Is there a way to print that?
answered 7 months ago
Relevant content
- asked 5 days ago
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago