I'm trying to change the logging level for my Cayenne 4.0 project but so
far I haven't had any luck. I'm also using log4j2 for the first time in
my project. In other projects I have simply followed these instructions
to modify the log4j.properties file and everything worked as expected.
# Turn SQL tracing on
log4j.logger.org.apache.cayenne.access.QueryLogger = INFO
# Turn SQL tracing off, e.g. to increase performance
log4j.logger.org.apache.cayenne.access.QueryLogger = WARN
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.
On the log4j2 side, I have also tried to add a setting in the log4j2.xml
file to disable the cayenne logging but still it still had no effect on
the logging detail. Here's the logger excerpt from my log4j2.xml files
<logger name="org.apache.cayenne.access.QueryLogger"
level="WARN">
<AppenderRef ref="ADEFAULT"/>
</logger>
I'm not sure what else to try at this point so some guidance would be
appreciated.
Thanks,
Andrew