VVV is App.Version with periods removed, and ppppp is App.Port.
Private Function GetLogPath() As String
Try
// Construct the expected filename pattern
Dim port As String = App.Port.ToString
Dim version As String = App.Version.ReplaceAll(".", "").Left(3) // e.g., "402" from "4.0.2"
Dim filename As String = <appname> + version + port + ".log"
Return "/var/log/lifeboat/" + filename
Catch e As RuntimeException
Return ""
End Try
End Function
The funny thing is I’m not sure where appname is coming from. In my case it’s not what’s in the IDE under Linux App Name, but it is the same as what I have in MacOS App Name. Maybe Lifeboat extracts it as LinuxAppName.NthField(" ",1), (true in my case), but in any case, you can find out by entering
ls -la /var/log/lifeboat/
in your server’s bash terminal - you’ll see the name+version+port in a number of filenames.
Make sure you allocate that stream when your app launches if you intend to use it for logging exceptions because your app could be in a state where it can’t allocate new objects.
I am trying to pinpoint which URLConnection is making my app crash, so I will log each call to the URLConnection.Send method
And then log again on ContentReceived or Error
Analyzing the logs will be difficult as there are 100s of http requests per minute…
If you include the first 8 characters of the session ID in your log messages, you should be able to sufficiently separate them when analyzing the logs.
Just FYI, I too have been having URLConnection issues lately where after running for a while, trying to initiate a new URLConnection from within the context of another’s ContentReceived event will hang the app. It’s hard to quantify which version of Xojo this started in because the whole reason I updated to a newer version was to replace Workers with preemptive threads, but something about URLConnection is definitely broken.