java - Enable Logging JBoss EAP 6.2 log4j -


i have web app trying migrate jboss eap 6.1. have tried every suggestion on accomplish log4j logging , can't seem traction. server logs don't logged nor eclipse console logged using log4j statements. have tried system.out statements , don't work. web app , running , logs startup of jboss.

what have tried

  • moving log4j.xml web-inf
  • moving log4j.xml src/main/java gets bundled in classes folder
  • creating jboss-deployment-structure.xml , placing in meta-inf folder
  • changing logging library org.jboss.jboss.logging.logger
  • adding java_opts="$java_opts -dorg.jboss.as.logging.per-deployment=false" standalone.conf file

posts have referenced:

  1. link 1
  2. link 2
  3. link 3
  4. link 4

this seems such simple thing, yet @ total loss. next step forget web app , make little test app , see if can logging. maybe conflict or somewhere. anyhow, appreciated. thanks.

edit 1 log4j.xml contents james

<?xml version="1.0" encoding="utf-8"?><!doctype log4j:configuration system "log4j.dtd" >     <log4j:configuration> <appender name="stdout" class="org.apache.log4j.consoleappender">     <layout class="org.apache.log4j.patternlayout">         <param name="conversionpattern" value="%d{absolute} %5p %c{1}:%l - %m%n"/>     </layout> </appender>   <appender name="dailyrollingfileappender" class="org.apache.log4j.dailyrollingfileappender">     <param name="file" value="/logs/voice/config/configdblog.log"/>      <!-- c:\\tmp\configdblog.txt -->      <param name="append" value="true"/>     <param name="datepattern" value="'.'yyyy-mm-dd"/>     <layout class="org.apache.log4j.patternlayout">     <!--param name="conversionpattern" value="%d [%t] %p - %m%n"/-->     <param name="conversionpattern" value="%d{absolute} %5p %c{1}:%l - %m%n"/>     </layout> </appender>   <logger name="e1audit">     <level value="warn"/>     <appender-ref ref="stdout"/> </logger>  <root>     <priority value="trace"/>     <appender-ref ref="dailyrollingfileappender"/>     <appender-ref ref="stdout"/> </root>  </log4j:configuration> 

removing log4j.xml completley got app logging. guess conflict since log4j.xml in classpath?


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -