I am getting error 'ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.' while executing ant target : instrument.
My ANT target :
<target name="instrumentHibernate">
<taskdef name="instrument" classname="org.hibernate.tool.instrument.javassist.InstrumentTask">
<classpath>
<path refid="all_classpath"/>
</classpath>
</taskdef>
<instrument verbose="true">
//Error is thrown at this block
<fileset dir="target/classes" includes="**/A.class" />
<fileset dir="target/classes" includes="**/B.class" />
<fileset dir="target/classes" includes="**/C.class" />
</instrument>
</target>
My project configuration :
ANT : 1.7
struts : 2.3.24
spring: 4.2.3
hibernate:4.2.8
I have tried below solutions:
1) changed property -Dlog4j.configuration to -Dlog4j.configurationFile
2) put the log4j2.xml file under src folder
3) add sysproperty in build script
4) set classpath to log4j2.xml
Questions :
1) If the errors in log4j2.xml will cause this error or it is only because log4j2.xml is not available while compiling?
2) Is there any tool available to validate my log4j2.xml?
3) Is there any ANT related dependency or ANT upgrade require?
Thanks