Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss & Log4j

 
Tom Simmons
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tom Simmons
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I'll take a read and reply over there.


Tom
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic