Hi I found this nice python recipe for a logging formatter to indent according to how deep the function is called http://code.activestate.com/recipes/412603-stack-based-indentation-of-formatted-logging/
I'm having trouble setting it as the default formatter with pymel though In loggingControl.py LoggingMenu.setFormatter() I have if fmt: handler.setFormatter(IndentFormatter(fmt)) But that means I have to set it up every time in maya by putting a %(indent)s in with the Logging Control->Set Formatter menu I've also tried replacing the pymelFormatter with my own in pymel.conf and assigning it to logger_pymel, but i'm sure i'm doing it wrong as it has no affect :( [logger_pymel] ## Set the root 'pymel' logger to INFO mode ## Setting PYMEL_LOGLEVEL environment variable will override this level=INFO qualname=pymel handlers=testHandler [formatter_IndentFormatter] format=%(indent)s%(message)s class=IndentFormatter.IndentFormatter [handler_testHandler] class=StreamHandler level=INFO formatter=IndentFormatter args=() Is there a nice way to change the default formatter for maya? thanks! Luke -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
