Cayenne uses apache commons logging as logging interface and if you want to use
log4j2 implementation you must include dependency to log4j-core and log4j-jcl
<https://logging.apache.org/log4j/2.x/maven-artifacts.html#Apache_Commons_Logging_Bridge>bridge
library:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
<version>2.2</version>
</dependency>
and create log4j2.xml in classpath. For instance lines below turn off logging
for me:
<Logger name="org.apache.cayenne" level="off">
<AppenderRef ref="Console"/>
</Logger>
> On May 11, 2015, at 5:24 PM, Aristedes Maniatis <[email protected]> wrote:
>
> On 11/05/2015 11:51pm, Andrew Willerding wrote:
>> For my new project with the log4j2 libraries, I have created a
>> log4j.properties file with the appropriate settings but the cayenne logging
>> is still in INFO mode. And I'm not sure where to place the log4j.properties
>> file so it can be found by Cayenne.
>
> log4j version 2 uses an xml configuration file, not a properties file. Also,
> because Cayenne is hooked into the old log4j version 1 library, you'll need
> the compatibility library for log4jv2 that let's it accept the old API.
>
> Ari
>
>
> --
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
>