Hi,

I'm reasonably new to jboss, and I am having difficulty getting JBoss to use
Log4j

I have uncommented the relevant lines in jboss.conf and also removed the
default file & console logging.

The service seems to start ok, except I get duplicate log entries appearing
in the Jboss console. However I am unable to make my own logs using the
Log4j.properties files supplied with Jboss.

Here is my code:

//Initialize logging
logService=new Log4jService();
logService.start();

Properties serviceProperties=new Properties();
serviceProperties.load(new
FileInputStream("c:/jboss-2.2.1/conf/default/log4j.properties"));
PropertyConfigurator.configure(serviceProperties);

// get a category instance
cat = Category.getRoot();

I get an exception org.apache.log4j.FileAppender saying that

A "org.apache.log4j.FileAppender" object is not assignable to a
"org.apache.log4j.Appender" object.


This is probably just a school boy error on my part, but does anyone have an
example piece of code thast does this properly.

cheers

Steve Doyle

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to