Disable/skip printing from shotgun in Maya etc

Hi Lukas

Thanks for the question!
There are a few things to say here:

  1. We have the global debug flag that you can turn off, but it sounds like you want to disable info level logging as well?
  2. Are you wanting to just stop the output appearing the software, but still have it logged to the Toolkit logs?
  3. You can change the log level globally for that session by changing the log level on the root_logger:
    import sgtk
    import logging
    lm = sgtk.LogManager()
    lm.root_logger.setLevel(logging.ERROR)
    
    This will affect the logging to the logs as well as the software’s console.

Best
Phil

2 Likes