import logging
_logger = logging.getLogger('myLogger')

for handler in _logger.handlers:
    _logger.removeHandler(handler)

ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
formatter = logging.Formatter('%(name)s:%(levelname)s: %(message)s')
ch.setFormatter(formatter)
_logger.addHandler(ch)
_logger.propagate=0

_logger.info('yeah')
# myLogger:INFO: yeah

I have set propagate to off already, where does the '#' come from when I 
use _logger in maya 2015?

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/c6cf48a7-6e51-4060-b606-d3ab4999a300%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to