[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    Re: [JBoss-user] logging sometimes works, sometimes doesn't
From:       "Marco Tedone" <mtedone () jemos ! org>
Date:       2003-08-29 20:10:59
[Download RAW message or body]

I cannot give you an answer to your question, but I can tell you what I do
to get a logger from within my EJB:

//The logger instance
private transient final Category log =
Category.getInstance(getClass().getName());

from now on, you can use log.info(String msg) or the other methods
associated with the log4j logger.

Hope it will help,

Marco
----- Original Message ----- 
From: "Matthew Hixson" <hixson@poindextrose.org>
To: <jboss-user@lists.sourceforge.net>
Sent: Friday, August 29, 2003 9:07 PM
Subject: [JBoss-user] logging sometimes works, sometimes doesn't


> I am doing some debugging and would like to see all logging messages
> written to the console.  In the class of interest I am gaining a
> reference to the logger like so:
>
> private static Logger _systemLogger = Logger.getLogger("CONSOLE");
>
> Sometimes I see messages like:
>
> [CONSOLE] : <message here>
>
> but more often than not I don't see them.  I haven't been able to
> figure out what it is that makes them show up.  Usually when I see them
> its just after restarting JBoss.  Anyone know why the messages would
> sometimes appear and other times not?
>    This seems like the classic problem of writing to stdout instead of
> stderr in C and learning that your debug messages don't always get
> flushed to the screen when you'd expect them to.
>    How can I make certain that my logging info makes it out to the
> console?
>
> JBoss 3.2.1, MacOS X 10.2.6, Java 1.4.1.
>
>    Thanks,
>      -M@
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> JBoss-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jboss-user





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic