Manufacturing toolkit provides built-in logging functionality that can be used to trace execution, analyze behavior, and debug issues. Logging is handled through a global singleton instance: Utilities_Logger.Instance() .
The logger filters messages based on severity levels (Utilities_LoggerLevel ) and dispatches accepted messages to registered handlers.
Message delivery is synchronous, meaning execution continues only after all handlers have processed the message.
Message level is defined by an enumeration Utilities_LoggerLevel . The following levels are supported (given in the order of decreasing severity):
Utilities_Logger.SetLevel() sets a threshold level for the messages which should be accepted by the logger. The messages sent with the same or greater level are accepted, the ones with a lower level are ignored.
The Debug and Trace levels are reserved for internal purposes and should not be used by the MTK users.
Variable | Effect |
---|---|
MTK_LOG_FILE | Enables logging to the specified file (absolute path required). |
Handlers are responsible for processing log messages. They implement the Utilities_LoggerHandler interface. The MTK provides the following built-in handlers:
Handlers are executed in the order they are registered. They must be unregistered before destruction.