Title: RE: [JBoss-user] HELP : JBoss 3.0.x isn't logging ANYRuntimeExceptions!!

Alan,

Here is a little snippet from how I am doing this:

 

import org.apache.log4j.Category;

 

public class CategoryDAO {

 

    private static String CLASSNAME = CategoryDAO.class.getName();

    private Category cat = (Category)Category.getInstance(CLASSNAME);

 

// blah blah

 

Hope that helps.

 

-James

 

 

-----Original Message-----
From: Alan Yost [mailto:[EMAIL PROTECTED]] On Behalf Of Alan Yost
Sent:
Thursday, July 25, 2002 7:16 AM
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] HELP : JBoss 3.0.x isn't logging ANYRuntimeExceptions!!

 

James - I'm a relative newbie to EJB, but have used log4j in the past.  What I'm not sure of is how is the log4j first configured for my EJBs?  

 

In a normal java application I would include the PropertyConfigurator.configure(myConfigFile) statement in the main(String[] args) block at the start of my application.  This however, goes out the window with stateless session beans and Entity beans. 

 

I'm not sure as to how JBoss will maintain one instance of my Logger class.  Will my classes (even just plain old java classes that are called by a servlet etc) somehow use the same instance of the logger class that JBoss is using - and therefore I can use the log4J settings that come with JBoss, of do I need to include a separate configuration file and if so when would I initialise it?

 

Any help or words of wisdom would be appreciated.

 

 

Regards

 

 

Alan.

 

 

 

Reply via email to