L
L
Light7772020-12-03 14:06:08
Java
Light777, 2020-12-03 14:06:08

How to specify the path to the log file in a Java application on a Linux server?

I am deploying a JAR on a Linux server.
I want to store all log files in the /var/log/ directory, which is located in root
in the application properties file

logging.level.org.springframework.web=debug
logging.level.org.hibernate=error
logging.file.name=/var/log/myproj/myproj.log

but the log file is created in the JAR directory, how to specify it correctly?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question