I want to use restart timestamp in log file name, can I get it somehow in properties file?
Current implementation:
logging.file.name=abc_services-${PID}.log
Something like below should be helpful:
logging.file.name=abc_services-${PID}-${timestamp}.log
Other ways to achieve are:
- Using system property LOG_FILE and set file name having timestamp
- Using logback-spring.xml file and use the way explained in this answer.
But achieving this in property file is what I find nice approach. Spring boot version 2.6.5