0

In my Spring Boot application I want to use logging to an external file.

So I configured application.properties like this:

# LOGGING
logging.path=/var/logs
logging.file=my-application.log

I want to us the application on a windows system and want to use NSSM to start the jar file as a windows service.

Also I want the external logfile I mentioned.

At the current state I tested this configuration only in my eclipse and the logfile called my-application.log is only present in my classpath.

There was no folder var created.

Anyway...

How can I configure this application logging to work like I wanted.

  • Use Spring Boot application as jar
  • Wrap it with NSSM to run as a windows service
  • Have an external logging file at the Location "D:\applications\SpringBootApp\logging\data.log"
1

2 Answers 2

0

I recommend setting the properties on the launcher command line. Add them to your service wrapper the same way you'd add other command-line arguments.

0

I think u must mention the drive or the network location u need to put that log file .

for ex: D:var/logs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.