Look at log4j.properties to see how to configure. If you want details, view
the documentation or download log4j at
http://jakarta.apache.org/log4j/docs/index.html. Note that log4j can also
be used for standalone programs. Once you configure, where the results
show up depend on how you configure. The two most common options are
console and file. You can specify where the log files are placed. The link
above provides some sample programs. Here is a quick snippet from an EJB I
wrote:
private final Category log = Category.getInstance(getClass().getName());
public void ejbCreate() throws RemoteException, CreateException
{
if (log.isInfoEnabled())
log.info("ejbCreate() called");
}
If you read the docs, you don't need the isXXXXEnabled() call - log4j will
filter, but it saves some CPU cycles.
----- Original Message -----
From: "sheena sid" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 01, 2001 5:25 AM
Subject: Re: [JBoss-user] configuring Log4J
>
> Thx for the reply....but I'm new to Log4J and totally in the dark here.
> Could you tell me which are the properties that I need to change? Can I
> then just execute as normal and presume the logging automatically takes
> place at runtime? So where do I see the results etc?
>
> Thanks again,
> Sheena.
>
> > ----- Original Message -----
> > From: "Scott M Stark" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Subject: Re: [JBoss-user] configuring Log4J
> > Date: Wed, 1 Aug 2001 00:13:15 -0700
> > Organization: JBoss Group
> > Reply-To: [EMAIL PROTECTED]
> >
> > Yes it is possible. How do you think a file based JDBC database like
> > cloudscape
> > accesses its data when accessed by an EJB? Its ok because it is
> providing
> > a transacted interface to the data via JDBC. If you don't need your
> logging
> > to
> > be part of the bean transaction then log to a file using log4j. If you
> do,
> > then
> > you would have to configure the log4j appenders to use JDBC or JMS and
> > through app server resource managers.
> >
>
> ----------------------------------------
> http://mail.indiainfo.com
> First you had 10MB of free mail space.
> Now you can send mails in your own language !!!
>
> _______________________________________________
> 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