Java Action log

0
Hi Forum, Unfortunately I don’t have much experience when it comes to Java integration with Mendix. When outputting a log in Java Action, what should you do if you want to log the name of the Microflow that called Java Action? Does the log output recognise if the Java file in the Java Action activity contains:   logNode.info ("Message")  
asked
2 answers
3

Hi,

- if you want to log the Microflow name that calls java action, you must do it in Microflow. If you want to make it generic, then you can pass the Microflow name as String to the java action and log it. I dont think you can have auto reference to the microflow that calls java action within the java action.

- If you want to log the events from Java action then do the following

ILogNode logger = Core.getLogger("<LogNodeName>");

logger.info("Your message");

- You can also log the messages at various level by using different methods like debug, trace etc.

answered
1

Hi, 

Kindly refer the following document, which will help you on logging info

https://docs.mendix.com/howto/monitoring-troubleshooting/log-levels

answered