Is there some simple placeholder I can use in the application.properties, something like:
logging.file=myApplication-${timestamp}.log
without any additional xml files or anything like that?
Is there some simple placeholder I can use in the application.properties, something like:
logging.file=myApplication-${timestamp}.log
without any additional xml files or anything like that?
No, you can't configure it without an additional logging configuration file specific to the logging framework itself (log4j, logback, ...). This is what the documentation mentions:
To configure the more fine-grained settings of a logging system you need to use the native configuration format supported by the
LoggingSystem
in question.
This answer explains how you could configure this for Logback.
If you are on unix based machine you can do so in shell script.
--logging.file=application-"$(date '+%Y-%m-%d:%H:::%M')".log
or
#!/bin/sh:
append_date = "$(date '+%Y-%m-%d:%H:::%M')"
java -jar spring-application.jar --logging.file=application-$append_date .log