I was using OpenAI module in my program. When I was doing logging in my program it was also logging the OpenAI requests, which I wanted to avoid.
I was doing this before
logger = logging.getLogger()
With this, I got the root logger and it was printing the logs of all modules in my program.
Now I am doing:
logger = logging.getLogger("Assitant")
This give me a logger for my program.