I am new to Logback, I am trying to add file path dynamically, with a property file, for both windows and Linux.
Here is the code sinppet I have, how can I get the value to ${MY_HOME}
${MY_HOME}/server.log
true
%d [%thread] %-5level %logger{35} - %msg%n
解决方案
Typically this is a system property, there are some answers that touch on this but only provide one part of the answer. These are:
But the manual on configuration shows that the mechanism is quite flexible
As in many scripting languages, logback configuration files support definition and substitution of variables. Variables can be defined within the configuration file itself, in an external file, in an external resource or even computed and defined on the fly.
In summary you have a number of options for defining the value of MY_HOME:
In the file
You are a