Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can we set logger level on Maya's default logger?

0 REPLIES 0
Reply
Message 1 of 1
loicLG
597 Views, 0 Replies

Can we set logger level on Maya's default logger?

Hi There,

I'm trying to change the level of Maya's default logger so I can remove all the warning and useless information when saving or opening a file.

I've been googling for a while but I cannot find a way to do this.

The closest thing I found was

 

cmds.scriptEditorInfo(suppressWarning=True)

 

but it doesn't actually work in my case since it re logs all of the warnings when setting back to False. I'm assuming it's to be used in conjunction with the write history if you want to redirect the log into an external file (without capturing warnings).

 

So I figured, maybe I can just change the level of their logger just like I do on mine but I can't figure this out.

 

logger = logging.getLogger(__name__)
logger.setLevel(logging.CRITICAL)

 

 This still logs warnings so I'm assuming this is not finding the correct logger?

 

Any info? 

 

cheers

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report