Hi all!
  I begginer with Log4j, and I have a problem that I need help:
  I use:
  anonymous wrote : jboss-4.0.5.GA, EJB3.0
  I have a bean (called RecordBean):
  anonymous wrote : ...
  | private static final Logger myLogger = Logger.getLogger(RecordBean.class);
  | 
  |     public void add(int num1, int num2) {
  |             myLogger.info("Perform the adding two numbers...");
  |                 ...
  |     }
   And inside anonymous wrote : \server\default\conf, I edit file log4j.xml 
(add my definition):
   <appender name="XXX" class="org.apache.log4j.FileAppender">
  |       <param name="File" value="${jboss.server.log.dir}/mylog.log"/>
  |       <param name="Threshold" value="INFO"/>
  |           <layout class="org.apache.log4j.PatternLayout">
  |       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
  |       </layout>
  |    </appender>
  | .....
  |    <logger name="bean.log">
  |         <appender-ref ref="QT"/>
  |    </logger>
  |    
  |    <root>
  |       <appender-ref ref="CONSOLE"/>
  |       <appender-ref ref="FILE"/>
  |    </root>
   But when I deploy RecordBean, and my client call add method, logging ok, but 
I receive some Warning:
anonymous wrote : log4j:WARN No appenders could be found for logger 
(org.jboss.security.SecurityAssociation).
  | log4j:WARN Please initialize the log4j system properly.
  I imported log4j.jar.
  Please help me to solve this problem.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082008#4082008

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082008
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to