[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Custom Logger in JBoss

jbossACM do-not-reply at jboss.com
Thu Nov 1 15:47:19 EDT 2007


Have you tried defining your loggers inside the log4j.xml that you place in your server's conf directory?

It would look something like this:

Inside your class:
private Logger dataLog = Logger.getLogger("YOUR_LOGGER"); 

Inside your log4j:
<appender name="YOUR_LOGGER_FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
  |       <param name="File" value="${jboss.server.home.dir}/log/yourFile.log"/>
  |       <param name="Append" value="true"/>
  | THE REST OF YOUR CONFIGURATION
  | </appender>
  | 
  | <category name="YOUR_LOGGER">
  |      <appender-ref ref="YOUR_LOGGER_FILE"/>
  | </category>
This might help you out.

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101067



More information about the jboss-user mailing list