Hi,
I have setup NSSM to execute a powerbuilder application and make it run as service. I have setup the I/O options to write the logs to a file and also the stderr to another file. However when the service is started and the application is running, the stdout and stderr files are empty and no logs are being written to them. In case of failure of the service, I would like to know the status and want to refer these logs. How can this be solved? What might be causing blank logs being created?
I have a log table in Database already where the PB application updates the status as part of logs and that table is getting updated as expected.
But when it is setup as service through NSSM, I wanted to know if we need to write code specifically from PB to write in the log files that were setup as stdout and stderr files in I/O section while setting up the service. When I selected the I/O files and placed them to write in the same location as PB exe was present, the files were blank and no details were present in them. Are these files supposed to be updated programmatically from PB and then only they will show the details in case of any issue in NSSM?
Have you tried just using a simple PB FileWriteEx() command?
You can add this capability to PB apps, but it requires the use of some Windows API functions. Here's some example code:
https://www.rgagnon.com/pbdetails/powerbuilder-print-to-the-console.html