log4j2.xml defines RollingFile with fileName="${sys:catalina.base}/logs/${application.name}.application.log"to run from my eclipse workspace path as well as the jenkins build?
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
in to run from my eclipse workspace path as well as the jenkins build?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
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.
log4j2.xml defines RollingFile with fileName="${sys:catalina.base}/logs/${application.name}.application.log"to run from my eclipse workspace path as well as the jenkins build?
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
I would recommend either logging to a fixed place, such as /var/log on a *NIX, or going relative, i.e. against the working directory.
Either should fix your problem, as well as make things simpler.
--
DF.
On Monday, December 19, 2022 at 11:42:44 AM UTC-5, Daniele Futtorovic wrote:
I would recommend either logging to a fixed place, such as /var/log on a
*NIX, or going relative, i.e. against the working directory.
Either should fix your problem, as well as make things simpler.
I ran it with the filename="logs/..." path which should be relative to the build. I haven't looked for the log files from the jenkins build but it didn't crash.
I was wondering if there was a standard convention for log4j2 writing to files from a maven jenkins build
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 499 |
Nodes: | 16 (2 / 14) |
Uptime: | 43:27:35 |
Calls: | 9,832 |
Calls today: | 2 |
Files: | 13,764 |
Messages: | 6,193,527 |