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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
> [EMAIL PROTECTED]
> 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
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to