Mendix on-premise via Management Console: how to configure and/or redirect logging programmatically?

4
Our company is planning to integrate our product with Mendix, on-premise (not on the cloud), on Windows Server. https://docs.mendix.com/developerportal/deploy/deploy-mendix-on-microsoft-windows/ We are investigating the logging/tracing capabilities, to see if we can integrate them with the logging system of our product, in real time (we typically use ETW - Event Tracing for Windows) and/or for post-mortem analysis. We installed the Mendix Management Console 4.7, the Mendix Server 9.12.5 and some apps created by our colleagues with Mendix Studio Pro 9.12.5 (but we plan to move to 9.18 soon). Apparently, the only options that one can set in the "Settings.yaml" file for an app are: LogFileName, MaxLogFileSize, MaxLogFileCount. https://docs.mendix.com/refguide/custom-settings/#3-log-file-settings Is there something else that can be configured via the "Settings.yaml" file?  For example, this forum post suggests "For trace level, i believe you need to modify the loglevel in the Settings.yaml file", but we cannot find documentation for that. The Mendix Management Console can configure the levels for the various Log Nodes, but only when the Mendix Service is running. When you stop the service, any customization is lost. Furthermore, the Mendix Management Console can subscribe to log messages in real time.  Is there a way to do all this things programmatically? Alternatively, is there a way to write a plugin to "redirect" the log messages to our preferred destination?   There is this documentation about syslog, but it looks like it can be done only on *nix systems. Apparently, just pasting the typical logging configuration of a "m2ee.yaml" file into a "Settings.yaml" file does not work... are we missing something? We did not find a "m2ee.yaml" file in our apps.  Thank you in advance
asked
1 answers
1

You can create you own logsubscriber in java. This subscribes to the lognodes in the application and then it’s up to you to send this data to the place were you need this.

A good starting point would be to have a look at the logging module from the appstore, see https://marketplace.mendix.com/link/component/159/CAPE-Groep-B.V./Logging-Module this subscribes to the lognodes and writes the logs to the Mendix application database, but with the technique used to can redirect the log data to something else with the help of some java code.

This might be a solution in your situation.

answered