0
votes

I'm using spring-boot-starter 2.3.3.RELEASE version. I'm running my spring cloud configuration server in native profile (looking for configuration files in file system). I added logging.file = /var/log/config.log in application.properties file. But my application is not logging logs to this file.(All other microservices are logging to this location). Am I missing any additional settings for Spring cloud config server? Thank you so much for your help.

2

2 Answers

0
votes

In the spring boot 2.3.3 RELEASE documentation the logging properties that specify where the location should be is indicated using the property:

logging.file.path={path}

The documentation: https://docs.spring.io/spring-boot/docs/2.3.3.RELEASE/reference/htmlsingle/#boot-features-logging-file-output

This modification from logging.path to logging.file.path appears as a deprecation in Spring Boot 2.2: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.2-Release-Notes#deprecations-in-spring-boot-22

0
votes

One way to do it with spring-boot application is, setting it from command line argument as default it will dump every thing on console.

logging.file=logs/test.log

Old school but far effective, save path in application.properties

logging.file=logs/test.log