Logs
Logs Overview
Selecting Logs from the menu shows the overview of logs and traps.
Logs
All the logging generated by a Mendix application is visible in this overview.
The logs are presented per hour. 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 until right before the Trap now button was clicked.
The logging will be cleaned up automatically. To prevent a log or trap record from being deleted by the auto-cleanup mechanism, click Pin on the record. You can also delete logs or traps manually by clicking Delete ().
Traps
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.
Trap Exclusions
If there are traps with errors, warnings, or messages that are known, not of interest, or don’t 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.
The Test button performs a query on the APM manager to see if existing logs or traps match the patterns. This is added for convenience to test if the patterns work as expected.