Why does JBoss use its own classes when the ones that come with log4j work
just as well?  I was learning to use log4j for my own (non-JBoss) Java
programs.  I started with the JBoss log4j.properties file, and when I got
various "class not found" messages, I replaced the JBoss classes with the
standard log4j ones as follows:

# log4j.categoryFactory=org.apache.log4j.DefaultCategoryFactory
log4j.appender.Console=org.apache.log4j.ConsoleAppender

I don't really remember now why the categoryFactory line is commented out -
maybe that class is abstract.  Regardless, this configuration works just
fine.

----- Original Message -----
From: "Scott M Stark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 25, 2001 12:26 PM
Subject: Re: [JBoss-user] log4j system.out category


> Try this:
>
> # Set the JBossCategoryFactory as the default CategoryFactory
>
log4j.categoryFactory=org.jboss.logging.log4j.JBossCategory$JBossCategoryFac
> tory
>
> log4j.rootCategory=ERROR, Console
>
> ### The console appender
> log4j.appender.Console=org.jboss.logging.log4j.ConsoleAppender
> log4j.appender.Console.Threshold=INFO
> log4j.appender.Console.layout=org.apache.log4j.PatternLayout
> log4j.appender.Console.layout.ConversionPattern=[%c{1}] %m%n
>
> log4j.category.Default=INFO



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

Reply via email to