On Sep 21, 2007, at 4:35 PM, David Blevins wrote:


On Sep 21, 2007, at 4:07 PM, David Blevins wrote:


On Sep 18, 2007, at 6:47 PM, Karan Malhi wrote:

* WILL USE THIS THREAD TO POST SOME OBSERVATIONS ABOUT THE OPENEJB.LOG FILE *

Trying to work out some examples for the JNDI names documentation.
Here are some of my observations regarding openejb.log

1. Error messages: Error messages are written to the log file. So if I
try to deploy an EJB and there were deployment errors, the deploy
command shows the stack trace on the console, also the error is
written to the logs. However, if I place an ejb jar in the apps
directory and then start the server, the server starts successfully,
however there is no indication on the console that there was a
deployment error. So if I don't check the logs after starting the
server, I would come to know of the error after I write the client and
lookup the EJB, and the lookup fails.

Any suggestions on how this could be improved. Do you think the user
could be notified of the error on server startup itself?

I wonder if from a pure log4j configuration perspective we could setup a ConsoleAppender and set it's level to ERROR and add it along with our other appender. I'm not sure if you can set the log level on a per-appender basis, but it'd be really cool if you could.

Looks like java.util.Logging is missing the super-cool-key-nifty- neat, Blevins Patented, log level on a per Handler (Appender) concept.

Makes me want to write my own logging framework. I should be able to add an Appender/Handler and specify the level it's interested in. An "email" appender listening on ERROR, a "page support" appender listening on FATAL, etc. etc.

You should be able to do that by writing a Log4j Filter. The Filter would DENY any LoggingEvent where the level != the exact level you specify.

-dain

Reply via email to