java - Unable to access file:log4j.properties, but have told Maven to use only log4j2 -


i'm getting message:

error statuslogger unable access file:log4j.properties java.io.filenotfoundexception: log4j.properties (no such file or directory)... (+ stacktrace)

...despite telling maven 2.1 , have log4j2.xml , not have log4j.properties. log4j2.xml working doing want to.

i in console whenever run junit (4.x) tests.

i using intellij run/debug. i'm using jdk 1.8.0_25.

it true first time i've used log4j 2.x, not understand why stacktrace showing if had log4j 1.x jars or asking log4j 1.x.

$ mvn dependency:tree [info] --- maven-dependency-plugin:2.8:tree (default-cli) @ cda-feeder --- [info] com.imatsolutions:cda-feeder:jar:1.0.0-snapshot [info] +- sax:sax:jar:2.0.1:compile [info] +- org.apache.logging.log4j:log4j-api:jar:2.1:compile [info] +- org.apache.logging.log4j:log4j-core:jar:2.1:compile [info] \- junit:junit:jar:4.11:test [info]    \- org.hamcrest:hamcrest-core:jar:1.3:test 

my log4j2.xml:

<?xml version="1.0" encoding="utf-8"?> <configuration xmlns="http://logging.apache.org/log4j/2.0/config">   <properties>     <property name="level">trace</property>     <property name="log-path">/var/log/search/</property>     <property name="logfile-size">1 gb</property>     <property name="cda-filter">cda-filter</property>     <property name="console-pattern">%d{absolute} %5p %c{1}:%l - %m%n</property>     <property name="file-pattern">   %d{absolute} %5p %c{1}: %m%n    </property>   </properties>    <appenders>     <console name="console" target="system_out">       <patternlayout pattern="%-5p | %d{yyyy-mm-dd hh:mm:ss} | [%t] %c{2} (%f:%l) - %m%n" />     </console>      <rollingfile name="rollingfile"                  filename="${log-path}/${cda-filter}.log"                  filepattern="${log-path}/${cda-filter}-%d{yyyy-mm-dd}-%i.log"                  append="true">       <patternlayout pattern="${file-pattern}" />       <policies>         <sizebasedtriggeringpolicy size="${logfile-size}" />       </policies>       <defaultrolloverstrategy max="4" />     </rollingfile>   </appenders>    <loggers>     <logger name="root" level="${level}" additivity="false">       <appender-ref ref="rollingfile" level="${level}" />     </logger>      <root level="${level}" additivity="false">       <appenderref ref="console" />       <appenderref ref="rollingfile" />     </root>   </loggers>  </configuration> 


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -