[logback-user] Help with FileName and FilePAttern syntax:
Aniruddha Shevade
ashevade at gmail.com
Thu Feb 29 17:57:47 UTC 2024
Hello
I am trying to migrate from log4j2 to logback. I am trying to find
equivalent syntax for filename and filepatterns in this case
log4j2.xml
<RollingFile name="myLOg"
*fileName="/log/${env1}-{{*myEnv|||@mydir@*}}-app.log"* .../>
When i use something like this I get an exception saying invalid Repition.
I m not sure what the above code was intended to do.
1. How can i convert this fileName to a valid one in logback ?
2. I do understand it will resolve ${env1} properly from environment
variables. The "myENv" is being defined in a .properties file being loaded
by the application. I have seens examples in logback.xml like
<RollingFile name="myLOg" *fileName="/log/${env1}-:[myEnv]-app.log"* .../>
what* does the :[myEnv] do here ? Would it resolve to a property set in a .*
properties* file?*
*ALso not sure what the @ symbol means in the log4j, and if it has any
equivalent here?*
thanks for any pointers
Best Regards
Ani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20240229/afeb45b0/attachment-0001.htm>
More information about the logback-user
mailing list