On Friday, December 16, 2022 at 2:02:25 PM UTC-5, Andreas Leitgeb wrote:
log4j2.xml defines RollingFile with fileName="${sys:catalina.base}/logs/${application.name}.application.log"
This works when I run the app. This gets an error when I run mvn install in the test phase. Test works if I remove the catalina.base variable. How do I get this to resolve, or what is the normal log path for maven test phase platform independent, as
in to run from my eclipse workspace path as well as the jenkins build?
Based on this, either the property catalina.base wasn't really removed,
or the test pulled a different logging config.
With an undefined property, and an entity using that property, I wouldn't have expected any behaviour other than maybe a default-logger to console.
fileName="${sys:catalina.base}/logs/${application.name}.application.log" is for running on tomcat
I changed the xml path to fileName="logs/${application.name}.application.log" for printing to a log file in my maven build.
The catalina.base variable should be part of the path when it's running on tomcat. Shouldn't it also be able to use log4j2 in the maven build, unit tests?
Maven build doesn't have a value for the variable, so how do I assign it, or what is normal for a log path?
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)