Procedures for Log Messages
The following interface procedures can be used to define text messages that will be written to the log file of the respective MERLIC application that was started, e.g., the MERLIC Creator or MERLIC RTE. You can find the log files in the default directory "%LOCALAPPDATA%\MVTec\MERLIC\" . In case the MERLIC Creator is used, the log messages are written to the log files of the MERLIC Creator with the prefix "merlic_creator", e.g., "merlic_creator_2022_08_14_08_19_23_7764_000.log". In case MERLIC RTE is used, the log messages are written to the log files of MERLIC RTE with prefix "merlic_rte", e.g., "merlic_rte_2022_08_14_09_19_23_7764_000.log". For more information about the available logging settings for MERLIC, see the topic Logging in the MERLIC manual.
The procedures below only write the specified text message to the log file. If you want to set the tool state of the custom tool, you have to use the interface procedures described in the topic Procedures for Tool States.
Procedures
This procedure can be used to log an error with the passed text to the log file of the MERLIC application. Messages of this category provide some information about a serious problem which has to be fixed in order to continue working.
Me_console_error ( : : ToolHandle, Text : )
Parameters
The procedure contains the following input parameters:
|
Input parameter |
Description |
|---|---|
|
ToolHandle |
The ID of the tool. |
|
Text |
The text message to be logged. |
This procedure can be used to log information about HALCON errors to the log file of the MERLIC application. An "Exception" message must be catched in a "try/catch" block and passed with this procedure to MERLIC.
Me_console_exception ( : : ToolHandle, Exception : )
Parameters
The procedure contains the following input parameters:
|
Input parameter |
Description |
|---|---|
|
ToolHandle |
The ID of the tool. |
|
Exception |
The error message to be logged. |
This procedure can be used to write the passed text with log level "info" to the log file of the MERLIC application. This allows you to get feedback concerning the current status and to track problems over several executions. Messages of this category provide some information to prevent possible future problems.
Me_console_log ( : : ToolHandle, Text : )
Parameters
The procedure contains the following input parameters:
|
Input parameter |
Description |
|---|---|
|
ToolHandle |
The ID of the tool. |
|
Text |
The text message to be logged. |
This procedure logs a warning with the passed text to the log file of the MERLIC application. Messages of this category provide information about problems that should be fixed but are not serious.
Me_console_warn ( : : ToolHandle, Text : )
Parameters
The procedure contains the following input parameters:
|
Input parameter |
Description |
|---|---|
|
ToolHandle |
The ID of the tool. |
|
Text |
The text message to be logged. |