1. Sailaja Sumanam
  2. PowerBuilder
  3. Friday, 20 September 2024 09:24 AM UTC

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?

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 20 September 2024 14:07 PM UTC
  2. PowerBuilder
  3. # 1

Hi Sailaja;

  Are you writing to log files that are located in the same folder as the PB App Service EXE was started from?

Regards .. Chris

Comment
  1. Sailaja Sumanam
  2. Friday, 20 September 2024 15:57 PM UTC
Hi Chris,



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?

  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 20 September 2024 17:45 PM UTC
Sounds like a "permissions" issue maybe?

Have you tried just using a simple PB FileWriteEx() command?
  1. Helpful
  1. John Fauss
  2. Friday, 20 September 2024 18:10 PM UTC
PB apps are expected/designed to be visual. Could the logs being empty be the result of a PB application not being designed to use stdout and stderr?

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
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.