You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Karan Malhi <ka...@gmail.com> on 2007/09/19 03:47:52 UTC
openejb.log -- Observations
* 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?
--
Karan Singh Malhi
Re: openejb.log -- Observations
Posted by Dain Sundstrom <da...@iq80.com>.
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
Re: openejb.log -- Observations
Posted by Karan Malhi <ka...@gmail.com>.
Very cool,
I love the idea
Wanna work on it together?
On 9/21/07, David Blevins <db...@visi.com> 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.
>
> Who wouldn't want that.
>
> -David
>
>
--
Karan Singh Malhi
Re: openejb.log -- Observations
Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 9/22/07, David Blevins <db...@visi.com> wrote:
> Looks like java.util.Logging is missing the super-cool-key-nifty-
> neat, Blevins Patented, log level on a per Handler (Appender) concept.
Very funny! I couldn't stop laughing when I saw it. Looks like you're
in a mood to fix/break* something and see what happens ;-)
* cross out the unimportant
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl
Re: openejb.log -- Observations
Posted by David Blevins <db...@visi.com>.
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.
Who wouldn't want that.
-David
Re: openejb.log -- Observations
Posted by David Blevins <db...@visi.com>.
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.
-David