Message Levels
Python Message Levels
Katana recognizes the following standard log message levels from the Python logging module:
• DEBUG
Generates messages of debug level and higher.
• INFO
Generates messages of info level and higher.
• WARNING
Generates messages of warning level and higher.
• ERROR
Generates messages of error level and higher.
• CRITICAL
Generates critical messages only.
Messages shown in the UI are generated by the root logger, which is configured with the ${KATANA_ROOT}/bin/python_log.conf file. If you're using Katana in Batch mode, all render messages are logged as INFO log messages to the MainBatch log. The reason for the fixed Python log configuration is that the actual logging is all configurable using log.conf instead of python_log.conf. The exception to this is the passing of messages to the Messages tab, where filtering is performed in an interactive manner.
To configure the Python logger for an interactive session you can acquire the specific logger and set its level. For example, try the following in the Python tab:
noisyLogger = logging.getLogger('NoisyLogger') noisyLogger.setLevel(logging.WARN)
This should silence all INFO messages from this logger only.
For example:
1. | Load a scene and note the INFO message: [INFO python.NodegraphAPI.NodeXmlIO]: Loading "/tmp/anyScene.katana"... |
2. | Execute the following in the Python tab: |
loadingLog = logging.getLogger('NodegraphAPI.NodeXmlIO') loadingLog.setLevel(logging.WARN)
3. | Now load the scene again. |
The INFO message is not logged.