aspose file tools*
The moose likes JBoss/WildFly and the fly likes JBoss & Log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss & Log4j" Watch "JBoss & Log4j" New topic
Author

JBoss & Log4j

Tom Simmons
Greenhorn

Joined: Nov 16, 2010
Posts: 11
Having found the JBoss forums to be pretty much useless, I'm hoping someone here can help me.

A few years back worked on a project using Tomcat and JSP, the Log4j set up was such that we had a properties file that listed a couple of appenders and lots of loggers. We created a logger entry for each new class or section (more often) of the program we wrote. The beauty of this was that we could set the logging to Warn or similar for older established code, and set it at Debug for new code or when someone reported a problem.

Under JBoss (5.1 GA) the code I have inherited for a current project has a line in each class ...

private static final Logger log = Logger.getLogger(ClassFolder.class);

Which I understand is creating a logger for the class, there is then a default appender defined as standard in the JBoss installation so the granularity is set for all output.

I know that you can create multiple appenders in the JBoss Log4j conf file, and I know you can control the logging level for specified types etc. What I'd like to do though is set up something like I used to have where all configuration is part of the project.

Does anyone understand what I'm looking for and know how to do it?


Tom
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

Since your post in the JBoss forum had much more details on what you wanted, I just replied there http://community.jboss.org/message/625972#625972

[My Blog] [JavaRanch Journal]
Tom Simmons
Greenhorn

Joined: Nov 16, 2010
Posts: 11
Thanks, I'll take a read and reply over there.


Tom
 
Consider Paul's rocket mass heater.
 
subject: JBoss & Log4j