0

I use the python Sh module to do several things. I have logging working like I want in my program but when I set the level to DEBUG I see way too many messages from Sh. I really only care about DEBUG messages from my code. How can I shut off logging for just one module I didn't write? I looked at the Sh website but didn't see anything useful.

user1625344
  • 183
  • 1
  • 13
  • 1
    How are you setting the level? It sounds like you are setting the log level of the root logger, which is inherited by the logger used by Sh. You'll probably want to create at least a single logger to be used by *your* code that you can configure separately from the root logger. – chepner May 24 '21 at 15:08
  • Or, you can look at the Sh code to see the name of the logger it uses, and configure it to have a higher level than whatever you set the root logger to. – chepner May 24 '21 at 15:11
  • Check this question: https://stackoverflow.com/questions/35325042/python-logging-disable-logging-from-imported-modules – schilli May 24 '21 at 21:31
  • Yes, multiple loggers are what I need. – user1625344 May 24 '21 at 21:34

0 Answers0