But this will print out jBoss messages at the info level, ne?

-----Original Message-----
From: Scott M Stark [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 25, 2001 11:27 AM
To: [EMAIL PROTECTED]
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

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
From: "Ferguson, Doug" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 25, 2001 7:49 AM
Subject: RE: [JBoss-user] log4j system.out category


> Ok..
>
> This is all great, but I never got my original question answered.
>
> We are going to beta on friday.. I can't go back and change all our
logging
> at
> this point. I was curious if there is someway that I can set my bean code
to
> print out at the info level (i.e. System.out) and have jBoss messages only
> print
> at the ERROR level.
>
> I was told that system out was Default. So I tried this but it didn't
> work...
> **NOTE** I am not suer log4j.appender.Default. I am only using the
> ConsoleAppender.
>          I redirect the console to a file... so that I can capture any jvm
> failures.
>
> ***************************
>
> ### The console appender
> log4j.appender.Console=org.jboss.logging.log4j.ConsoleAppender
> log4j.appender.Console.Threshold=ERROR
> log4j.appender.Console.layout=org.apache.log4j.PatternLayout
> log4j.appender.Console.layout.ConversionPattern=[%c{1}] %m%n
>
> # Example of only showing INFO msgs for any categories under
org.jboss.util
> log4j.category.Default=INFO
>
>
>
>
> -----Original Message-----
> From: Nicolai P Guba [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 25, 2001 4:54 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] log4j system.out category
>
>
> David Jencks <[EMAIL PROTECTED]> writes:
>
> > include
> >
> > import org.apache.log4j.Category;
> >
> >
> > private Category log = Category.getInstance(MyClass.class);
> > //Or use a string, maybe for jsps, haven't tried
> >
> >
> > to log...
> >
> > log.info("my message");
> >
> > log.warn("HI");
> > catch (Exception e)
> > {
> > log.error("now you've really done it! You broke it with exception", e);
> > }
> > log.debug("be sure to ignore this");
>
> If you are try to log from within any of your Beans you can do the
> following:
>
> ==
> import org.jboss.logging.Logger;
> .
> .
> .
> .
> .
>
> Logger.warning ("Problem locating UDFs for removal:" + e);
>
> ==
>
> I think you need to add jboss.jar to your classpath.
>
> --
>   Nicolai P Guba    http://www.gnu.org         http://www.frontwire.com
>                     mailto:[EMAIL PROTECTED]     mailto:[EMAIL PROTECTED]
>                     GSM: +44 (0)7909 960 751   DDI: +44 (0)20 7368 9708
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>


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

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

Reply via email to