Sure, here are the relevant lines form jboss.conf in 2.2.1:
<!-- Uncomment to use the log4j based logging service and with the
log4j.properties.
When this service is used the ConsoleLogging & FileLogging should be
disabled.
-->
<-- MLET CODE = "org.jboss.logging.Log4jService"
ARCHIVE="jboss.jar,log4j.jar" CODEBASE="../../lib/ext/">
<-- /MLET>
I have a follow-up question, though. Will we eventually see jboss.conf go
away and have everything in jboss.jcml? I'm confused about what goes where.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 24, 2001 4:37 AM
Subject: Re: [JBoss-user] log4j+JBoss
The log4j setup is in jboss.conf (to be uncommented)? Not in my version
(JBoss 2.2.0 FINAL) - Just checked my older versions (2.1 and 2.0) and
neither do they.
(I don't think I deleted them)
Sean
--------------------------------------------------
Dr Sean Radford, MBBS, MSc
Senior Consultant
Agora Professional Services Ltd
[EMAIL PROTECTED]
http://www.agora.co.uk
"Guy Rouillier"
<[EMAIL PROTECTED]> To:
<[EMAIL PROTECTED]>
Sent by: cc:
[EMAIL PROTECTED] Subject: Re:
[JBoss-user] log4j+JBoss
eforge.net
24/05/2001 00:44
Please respond to jboss-user
I have a grand total of about 18 hrs experience with log4j, so put the
following remarks in that context, but what you discuss below doesn't put
the power and flexibility to maximum use. Here is the total of the
statements needed in the EJB code:
import org.apache.log4j.Category;
public class OurBean implements SessionBean
{
private final Category log = Category.getInstance(getClass().getName
());
public void ourMethod()
{
log.info("ourMethod called");
}
}
Everything else you show below can be configured in log4j.properties in
the jboss/conf directory. That way, your logging code is independent of
its final format and destination. You can change the format and
destination without making a single change to your source code.
To the original appender, log4j is already installed. Just use the above
statements in your source. Then configure how you want your output to
look and where you want it to go in log4j.properties. The existing one
will get you started. Finally, you need to update jboss.conf to disable
consolelogging and filelogging and enable log4j. All the statements are
already in the file, just comment and uncomment. From trial and error,
you can't comment by just surrounding the block of statements with <!--
and -->. The statements are executed anyway. You need to remove the
starting <.
Documentation for log4j can be found at
http://www.apache.org/foundation/projects.html. Look for log4j and follow
the links.
----- Original Message -----
From: Jaime, Paul
To: '[EMAIL PROTECTED]'
Sent: Wednesday, May 23, 2001 9:46 AM
Subject: RE: [JBoss-user] log4j+JBoss
You should be able to use log4j the same way as you do for any class. See
the examples on the Log4J docs.
This is my code on a state-full session bean,
file://*** IMPORT AS NEEDED ***//
import org.apache.log4j.Category;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.Layout;
import org.apache.log4j.FileAppender;
import org.apache.log4j.PropertyConfigurator;
file://** ON MY ejbCreate **//
file://set logging options
try{
Layout layout = new PatternLayout("%d{HH:mm:ss,SSS}%r [%t] %c %x -
%m%n");
cat.addAppender(new FileAppender(layout,"C:/temp/your.log",true));
cat.info("Started Log for EJB");
} catch(IOException e){
isDebug = false;
};
___________________________
Paul Jaime
[EMAIL PROTECTED]
___________________________
-----Original Message-----
From: Isidoro Fernandez Diaz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 9:03 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] log4j+JBoss
Hi!
I need to download log4j for JBoss... Can help me
anybody?
Also I need to learn how to install and to configure
log4j for JBoss.
Thanks folks. Bye.
Isidoro Fern�ndez D�az
mailto:[EMAIL PROTECTED]
Software Engineer
TELENIUM, The New Millennium Telecom Company
Agust�n de Fox�, 25, plta. 13
28036 MADRID
Tel. +34 91 315 85 62
Fax +34 91 315 63 37
http://www.telenium.es
_______________________________________________
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