User guide

30
logging.debug("This is a debugging message.")
Custom Logger
Instead of using the root logger, you can create a custom logger object. The following example creates a custom
logger and generates a message of each level using that logger:
import logging
log = logging.getLogger("myLogger")
log.info("This is an informational message.")
log.warning("This is a warning message.")
log.error("This is an error message.")
log.critical("This is a fatal error message.")
log.debug("This is a debugging message.")
NOTE: The Message level display option in the Messages window is independent of the level of message
actually generated. For example, if the Messages window is set to show debug messages, debug
messages are only actually be displayed if the level of message generated is also set to include debug.
See Installation and Licensing > Configuring Message Level in the Katana User Guide for more on
how to set the level of message that is generated.
5 MESSAGE LOGGING |