B4J Question jServer Logs

jahswant

Well-Known Member
Licensed User
Longtime User
I’m having some difficulties with Logs when the app is installed in program files with stand alone package. Even if I redirect logs to a specific file. It will always try to write log files in forbidden directory. How can I choose where jServer will wtite these files ?
 

josejad

Expert
Licensed User
Longtime User
Is it not possible ?
Based in this (wrong) principle, you've done it¡¡¡

1628674575978.png
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
surprised by the quality of your products
The current version of the underlying Jetty SDK is not compatible with the modules system. Not all features will work.
There are also not too many use cases where it makes sense to package the server. A server is different than a standard user facing app.

I recommend you to run it as a jar.
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
Did you mix it with a Ui project? What i mean is, did you created a ui project and imported the server library ?
 
Upvote 0

jahswant

Well-Known Member
Licensed User
Longtime User
Did you mix it with a Ui project? What i mean is, did you created a ui project and imported the server library ?
No. Since a moment, it's possible to create a standalone package with NON-IU APPs. My App is a TCP Based I added jServer to exploit Background Tasks and they are working Nicely.
 
Upvote 0

tchart

Well-Known Member
Licensed User
Longtime User
If you use Win SW to run your app as a windows service you can redirect the logs to a different directory;


e.g. the config file below will put the logs into a sub-directory called "logs" but there is no reason this couldnt be a temp directory or other location

XML:
<service>
  ...
  <logpath>%BASE%\logs</logpath>
  <log mode="roll-by-size">
    <sizeThreshold>10240</sizeThreshold>
    <keepFiles>8</keepFiles>
  </log> 
</service>
 
Upvote 0
Top