LumaPictures / pymel

Python in Maya Done Right
Other
479 stars 130 forks source link

Python root logging level set to DEBUG #377

Closed dalgos-adsk closed 7 years ago

dalgos-adsk commented 8 years ago

The logging module states that the root logger has to have a level specified. In the logging module, root = Logger(WARNING). However in the pymel.conf file, logger_root level is set to NOTSET. [logger_root] level=NOTSET handlers= remove_existing_handlers=False Options: Modify the pymel.conf file to set logger_root level=WARNING Modify pymel.plogging.pymelLogFileConfig() to set the root logger back to the original level (if set to NOTSET) Option2 should be more robust and allow for user configurable pymel.conf files while correcting the bug in the root logger level. Here is the code to add to plogging.py root_logger_level = root.level # store off the root logger level, to restore back at the bottom of this function

    # if root logger level not explicitly set in the pymel.conf file,
    # then set it back to the original value.  The root logger always
    # has to have a level.
    if logging.root.level == logging.NOTSET:

JIRA #MAYA-67049