Thanks David, this works fine, though I am still confused as to why
Category cat=Category.GetInstance("MyCategory");
cat.debug("Test Message");
does not work
cheers
Steve
-----Original Message-----
From: David Jencks [mailto:[EMAIL PROTECTED]]
Sent: 24 April 2001 22:34
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] Configuring Jboss to use Log4j ?
Hi,
Please try code along the lines of what I suggested in my first reply
I repeat
the log
org.jboss.logging.Log log;
when you create your object
log = Log.createLog("myname");
when you want to log something
Log.setLog(log); //duplicates NDC.push(source) log4j functionality
log.log("my message");
Log.unsetLog(log); //duplicates NDC.pop() log4j functionality
Don't create your own log4j service, use the one jboss has set up already.
On 2001.04.24 13:14:43 -0400 "Doyle, Steven" wrote:
> ok, I have got rid of the duplicates, but everytime I try log something
> myself I get the following error
>
> [] Started Log4jService,
> config=file:/C:/jboss-2.2/conf/default/log4j.properties
>
> [flightManager] No appenders could be found for category
> (com.wa.beans.flightManagerBean).
> [flightManager] Please initialize the log4j system properly.
>
>
> here is my code
>
> logService=new Log4jService();
> logService.start();
>
> cat = Category.getInstance(getClass().getName());
>
> cat.debug("Test Log");
>
>
> any ideas ?
>
>
> cheers
>
> Steve
>
> -----Original Message-----
> From: Scott M Stark [mailto:[EMAIL PROTECTED]]
> Sent: 24 April 2001 17:41
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Configuring Jboss to use Log4j ?
>
>
> No! Don't use jboss.logging if you have configured log4j as the log msg
> rendering mechanism by using the Log4jService. Once you have done
> this you can forget that JBoss has a legacy logging mechanism. At some
> point the jboss.logging package will not be used by any code and log4j
> will be the logging framework.
>
> ----- Original Message -----
> From: "Doyle, Steven" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 24, 2001 8:32 AM
> Subject: RE: [JBoss-user] Configuring Jboss to use Log4j ?
>
>
> > ok, so basically I shouldn't try and us log4j, but instead use the
> > jboss.logging.
> >
> > pity,
> >
> > thanks anyway
> >
> > Steve
> >
> > -----Original Message-----
> > From: David Jencks [mailto:[EMAIL PROTECTED]]
> > Sent: 24 April 2001 15:33
> > To: [EMAIL PROTECTED]
> > Subject: Re: [JBoss-user] Configuring Jboss to use Log4j ?
> >
> >
> > Hi, the current log4j connection with jboss ignores almost all good
> > features of log4j and duplicates much of its functionality. That being
> > said, using the non-log4j method of getting a log ends up with the
> logging
> > going through log4j. I hope I haven't left anything important out
> here, I
> > haven't tried to log from within a bean. A recent 2.3 patch lets you
> treat
> > log names ( the stuff that shows up in []) as log4j categories.
> >
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user