Can I know whether you are talking about retrieving the log file of the application you are developing in Joget or the log file of Joget itself?
For tomcat log files, refer to this:
https://stackoverflow.com/a/51181929
You may also try changing the LOGDIR to your desired location in the logj42 file through the Separate Logs of Different Origin/Plugins into Different Log Files subheader in Managing Log Files