<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Can we set logger level on Maya's default logger? in Maya Programming Forum</title>
    <link>https://forums.autodesk.com/t5/maya-programming-forum/can-we-set-logger-level-on-maya-s-default-logger/m-p/12628393#M457</link>
    <description>&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;I've been googling for a while but I cannot find a way to do this.&lt;/P&gt;&lt;P&gt;The closest thing I found was&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;cmds.scriptEditorInfo(suppressWarning=True)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it doesn't actually work in my case since it re logs all of the warnings when setting back to &lt;STRONG&gt;False&lt;/STRONG&gt;. 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).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;logger = logging.getLogger(__name__)
logger.setLevel(logging.CRITICAL)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This still logs warnings so I'm assuming this is not finding the correct logger?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any info?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;</description>
    <pubDate>Sat, 09 Mar 2024 01:34:25 GMT</pubDate>
    <dc:creator>loicLG</dc:creator>
    <dc:date>2024-03-09T01:34:25Z</dc:date>
    <item>
      <title>Can we set logger level on Maya's default logger?</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/can-we-set-logger-level-on-maya-s-default-logger/m-p/12628393#M457</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;I've been googling for a while but I cannot find a way to do this.&lt;/P&gt;&lt;P&gt;The closest thing I found was&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;cmds.scriptEditorInfo(suppressWarning=True)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it doesn't actually work in my case since it re logs all of the warnings when setting back to &lt;STRONG&gt;False&lt;/STRONG&gt;. 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).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;logger = logging.getLogger(__name__)
logger.setLevel(logging.CRITICAL)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This still logs warnings so I'm assuming this is not finding the correct logger?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any info?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;</description>
      <pubDate>Sat, 09 Mar 2024 01:34:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/can-we-set-logger-level-on-maya-s-default-logger/m-p/12628393#M457</guid>
      <dc:creator>loicLG</dc:creator>
      <dc:date>2024-03-09T01:34:25Z</dc:date>
    </item>
  </channel>
</rss>

