Picture of Wim 4127
Registered 6 years 310 days
Wim 4127 Wednesday, 3 June 2020, 11:25 AM
Where to find application log when debugging app
When I'm running the app from visual studio with the debugger, i see the output in the linux output window of visual studio. The output in this window is however truncated after some time and limited in size. How can I see the whole log file or find the log file of the app then? When I go to the AP manager, there is no log file for the app yet... is it located on my development machine then?
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Wednesday, 3 June 2020, 01:16 PM
Re: Where to find application log when debugging app
In debugging mode, the debug output is always written to STDOUT not to a logfile.

We're using a standard visual studio linux project which uses the linux console window which visual studio offers itself.

I couldn't find anything to configure this window or to redirect the output within visual studio, but maybe you have more luck searching this ;)

Greetings,
Daniel
Picture of Wim 4127
Registered 6 years 310 days
Wim 4127 Thursday, 4 June 2020, 02:00 PM
Re: Where to find application log when debugging app
In visual studio there is no solution, since the output is limited to 32k characters and not configurable. There is a topic on the roadmap for VS2019 to extend or make this configurable, but, I doubt it will be in there soon.

I tried creating a class XqtingAppInstance, that overwrites app instance log functions, and also the IInstanceLog functions, but, due to the strange "IInstanceLog" usage (at least, strange in my opinion) of the AppInstance/IInstanceLog class (inline implementations and alike) I cannot "catch" the log lines of the lower classes. Else, it would have been able to dump them in a file.

So isn't it possible and just simpler to update the implementation of the debug appPrint functions in such a way that also while debugging, it creates a log file just as in production? I guess that's only a small change?
Picture of Wim 4127
Registered 6 years 310 days
Wim 4127 Thursday, 4 June 2020, 02:01 PM
Re: Where to find application log when debugging app
By the way, I use the replication API, and, the startup of the replication generates so much logging already that its not even possible to see the start of my application in the output window... which is annoying and a log file would be really interesting to investigate some issues at startup time.
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Thursday, 4 June 2020, 03:11 PM in response to Wim 4127
Re: Where to find application log when debugging app
I checked in a change for the upcoming SR14:

#73493 - Write logs to logfile during debugging not just to STDOUT

But you shouldn't delete logfiles while debugging, as the manager can't send a SIGHUP to the App as it doesn't know the PID, so the logfile rotation doesn't work in this case.
If you delete logfiles, you must restart the debugging.

Greetings,
Daniel
Picture of Wim 4127
Registered 6 years 310 days
Wim 4127 Thursday, 4 June 2020, 07:17 PM
Re: Where to find application log when debugging app
Great, any idea on timing when this becomes available to us?
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Friday, 5 June 2020, 12:57 PM
Re: Where to find application log when debugging app
We're publishing new Service Releases on every second monday of a month.
But sometimes later if our internal tests are failing, so don't expect exactly next monday ;)
← You can define your color theme preference here