I run my web application with Payara with java -jar webapp.war
How do I set where the this Payara instance would log, for example I want to set it to /var/log/mywebapp.log
or just relative to the Uber Jar file, what would be the command to pass?
My goal is to tail
the logs from ssh so the log needs to have a path.
You can do it using from command line java -jar payara-micro.jar --logToFile /path/file.log
or you can do it programmatically using PayaraMicro.getInstance().setUserLogFile("/path/file.log").bootStrap();
, but I don't know if you need to use embbeded payara for do this on the main method. You can even create a logging.properties file and configure it, so you use --logProperties logging.properties
argument when run your jar file.