logging in java actions

0
i have included jar files in java action of a microflow and in jar file i have coded logging using log4j and if i run my only java code in eclipse it create or update log files but when i run it in mendix no log file is generated. So please help me how i can generate logging files from microflow in java actions to a particular destination in my disk. I am beginner in mendix .please help. thanks
asked
3 answers
3

You would be better using the built in logging functionality in Mendix.

I wrote a small tutorial on how to do this a few years ago that will help you set this up.

https://www.robertprice.co.uk/robblog/logging-from-a-mendix-java-action/

 

answered
1

In addition to what Robert already mentioned, if you have CommunityCommons included in your project, you can look in to Logging.java. It has methods like:

- createLogNode

- log

- simpleLog

Look in to Log.java from CommunityCommons on how to use it

answered
0

Why do you want to control the location of the logging yourself?

Mendix logs can be found when running locally in your console, when running in the cloud, you can find the live logging, download of current log and downloading archived logs in the project > deploy > logs

answered