show Log node from java action to user screen.

0
So I am logging ILogNode log = Core.getLogger(“JA”)  and then log.error(“some error msg”) and these are going into console of mendix pro, How can I show these error msg to user by using widgets like show message? Is there any other way we can show error messages logged in java action to user screen (without return type of JA to be String)?   Please help.
asked
3 answers
3

If you want to use $latestError/message you need to make sure your Java Action is throwing an Exception. The message you place in the exception will be available in the message attribute.

If you want to use the log functionality instead and access these messages you would need to use something like the Logging module from the Marketplace. This redirects log messages to an entity in your domain model that you can Retrieve as an object in a microflow.
https://marketplace.mendix.com/link/component/159

Hope this helps.

answered
1

I am not quite sure but I believe you can always find the “latestError” object where you can find the error message. If you use this as input for your widget, you can show the message you want

answered
1

You do not have to retrieve, it will be availabe in your microflow and you could use like this to show it to your end users:

answered