1 Logs Overview
Selecting Logs from the menu shows the overview of logs and traps:
All the logging generated by a Mendix application is visible in this overview. The logs are presented per hour, and you can filter traps and log levels.
By clicking Levels, the levels of the available log nodes can be changed. This is the same as in Mendix Studio Pro.
Clicking Trap now creates a trap right away, storing all the trace/debug logging that occurred until right before the Trap now button was clicked.
The logging is cleaned up automatically. The pin icon can be used to prevent log and trap records from being deleted by the auto-cleanup mechanism. You can also delete logs or traps yourself with the trash can icon. For more information, see the Cleanups section of Apps.
Trap records can be opened. When opening a trap, a list is displayed of all the low-level log records that happened just before the trap was displayed:
The Trap now button can be used to simulate a trap. This trap will be saved and can be used to get insights into what is happening in the application.
4 Trap Exclusions
If there are traps with errors, warnings, or messages that are known, not of interest, or do not need focus at the moment, they can be excluded. By using exclusions, only trap information of interest will be generated. Use the Exclude button in a trap to create an exclusion.
On the Trap exclusions tab, it is possible to manage which traps to ignore. It is possible to add, edit, copy, and delete exclusions as well as enable or disable them. By excluding certain errors, warnings, or messages, the Logs module will only capture information of interest.
An exclusion contains the following:
- Description – to describe what is excluded
- Enabled – to enable or disable this exclusion
- Node pattern – to match the node name
- Message pattern – to match the message
- Stack trace pattern – to match the stack trace
The patterns are regular expressions, which are used to check if a message should be excluded or not.
When creating an exclusion from a log or trap message using the Exclude button, the special characters in the message are automatically escaped according to the regular expression language by placing
\Q before and
\E after the text.
To make the pattern more generic, you need to escape according to regular expression rules. Place a backslash (
\) before any special character, including a backslash itself.
Clicking Test performs a query on the -APD Manager to see if existing logs or traps match the patterns. This is added for convenience to test if the patterns work as expected.