-
1. Re: Using Log4J in AS7
dmlloyd Sep 22, 2010 11:06 AM (in response to bosschaert)JBoss LogManager supports frontends for all logging frameworks; I haven't integrated some of them yet because they aren't used by any internal components. Here's the breakdown:
- Log4j - requires the log4j bridge implementation, not yet integrated
- JUL - natively supported by LogManager (done)
- Commons Logging - implemented using the "org.apache.commons.logging" module (which just reexports jcl-over-slf4j) (done)
- SLF4J - (done)
- JBoss Logging - (done)
I think that covers all the major ones. If you open a JBAS issue for log4j and assign it to me, I'll get to it ASAP.
-
2. Re: Using Log4J in AS7
dmlloyd Sep 22, 2010 11:11 AM (in response to dmlloyd)1 of 1 people found this helpfulThis page has some relevant info: Standalone JBoss LogManager
-
3. Re: Using Log4J in AS7
bosschaert Sep 22, 2010 11:13 AM (in response to dmlloyd)Thanks for the info, David. I've created https://jira.jboss.org/browse/JBAS-8459
-
4. Re: Using Log4J in AS7
dmlloyd Sep 22, 2010 12:20 PM (in response to bosschaert)OK, it should be working now. Log4j appears as "org.apache.log4j" in the module repository.
-
5. Re: Using Log4J in AS7
bosschaert Sep 23, 2010 2:42 AM (in response to dmlloyd)Excellent! That all works now. Many thanks.
-
6. Re: Using Log4J in AS7
davidj Nov 15, 2012 1:34 PM (in response to bosschaert)Hi,
Can someone step me thru how to setup log4j on JBoss AS7?
I've tried the following.
I have an EJB Jar file which has a "log4j.properties" file.
This same JAR file will log correctly on other AppServers (such as Glassfish).
I read else where that I must do the following in my "standalone.xml" file:
<size-rotating-file-handler name="MY_LOGGER">
<level name="TRACE"/>
<formatter>
<pattern-formatter pattern="%d{MMM-dd hh:mm:ss} [%c{1}] %m%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="myLogger.log"/>
<rotate-size value="9216K"/>
<max-backup-index value="3"/>
</size-rotating-file-handler>
<logger category="com.mycompany">
<level name="TRACE"/>
<handlers>
<handler name="MY_LOGGER"/>
</handlers>
</logger>
I tried that and it still doesn't work
I don't want to do anything fancy. All I want is for my log statements to be written in a file called "myLogger.log".
Any help would be appreciated.
-
7. Re: Using Log4J in AS7
techsjs2012 Jan 2, 2013 11:32 AM (in response to davidj)Looks like I am having the same issues moving project that are Spring, Log4J from tomcat to JBoss AS7.. Can someone please give me a breakdown of the steps I have to take to get this working