Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Andreas Leitgeb Newsgroups: comp.lang.java.programmer Subject: Re: log4j2 test? Date: Fri, 16 Dec 2022 19:02:11 -0000 (UTC) Organization: A noiseless patient Spider Lines: 10 Message-ID: References: <948bfc5a-7db1-468f-a8de-6f0786c5514fn@googlegroups.com> Reply-To: avl@logic.at Injection-Date: Fri, 16 Dec 2022 19:02:11 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="3a3bcdcce0a24a7f5b55d6f119fca788"; logging-data="3613384"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19v7DVMQGhgRnEE1rQfPUNF" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:7rfYJIvrca1hjq7mPn2dElSi8v4= Xref: csiph.com comp.lang.java.programmer:39873 e.d.pro...@gmail.com 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.