I'm working with log4j2 configuration xml where in i'm using the environment variable for setting the log level something like this
<Root level="${env:LOG_LEVEL}">
But i want to have some default value in case env var is not set i tried defining some properties in xml but no luck.Thanks
I believe you can specify a default value by specifying another colon followed by a hyphen:
${env:LOG_LEVEL:-WARN}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With