I was running NX with Python journals through PyDev previously, but it was taking too much time to set it up everytime so I changed to using the command prompt for NX. It runs, but it doesn't produce a syslog file like it did before when running NX in display mode. I've tried to force the log keeping but it doesn't seem to have an impact.
I don't have a functioning catch for NXExceptions/Exceptions yet. I could print those, but the syslogs would also be nice. Is that still possible?
Solved! Go to Solution.
NX should still create a syslog. You can find the location with theSession.LogFile.FilePath.
However in batch mode, I think he deletes the syslog after completion if the program terminates without an error. So if you want to keep it in that case, you could just as the very last thing you do copy the file somewhere safe.
If the program terminates with an exception, the logfile should be kept in any case.
It's part of the session class, so you need to do (Python example)
theSession = NXOpen.Session.GetSession() file_name = theSession.LogFile.FileName
and yes, it could be somewhere else, depending on the NX environment when you start. The logfile location is defined by the environment variable UGII_TMP_DIR if I am not mistaken. If you use some startup script to set that it could be different between your run_journal and ugraf calls.
By "terminate on its own" you mean it threw an Exception? Then the logfile should still be there.
However, I'm on Linux NX11, if you run something different, your behaviour could be different.