I dont want any logger prints in my terminal. I have separate log file where I will dump all the logger messages.
So now if I do
logger.exception('error')
The message will be shown in terminal which I dont want.
I assume I need to change something here in my code.
stream_handler = logging.StreamHandler()
stream_handler.setLevel(logging.ERROR)
Edited:
I have seen the one answer here - How to disable logging on the standard error stream?
According to that I need to set
stream_handler.setLevel(logging.CRITICAL)
If I do that in the logger file I am seeing some unnecessary prints. So I want to be in
stream_handler.setLevel(logging.ERROR)
And not want any prints in the terminal. So can somebody help ?