Thanks for the gentle but firm email :) Just the right balance.
On Jan 25, 2012, at 2:36 AM, AndyG wrote:
> So how about some info about how to configure the 'new' logging - I don't
> really care what logging is used as long as when it changes there is a
> little info for those using the 'old' logging.
>
> I just built and dropped in the jars onto my standalone test server (which I
> do at least once a week to see how things are going), and I now have no
> logging (slf4j - log4j, using conf/logging.properties). This happened before
> a few months ago, and I think I went in and 'fixed' it back.
>
> In an OpenEJB standalone context (I doubt I will ever need or use TomEE)
> what needs to be done to replace the 'conf/logging.properties' with the
> 'new' logging to ensure I have 'logs/openejb.log'.
>
> This is not a gripe as I am prepared to fit in to what works best for
> everyone else, but for info I now have over 15 standalone servers running at
> various locations (of which only 3 are remotely accessible, and several in
> production environments). I have a system tray app that 'understands'
> logs/openejb.log to a certain degree, and interceptors in embedded mode that
> do the same.
>
> I am sure if I RTFM on whatever logging is the 'default' that I would work
> out how to best configure it, but to just break the old logging before that
> happens is a bit of an ache.
>
> Andy.... Hmm, that does sound a bit like a gripe?
Ideally there'd be no RTFM involved in making things work like before.
Specifically, I think we could could make a fairly educated guess as to what
the user intends by:
- Checking for Log4j in the classloader
- Looking for log4j.* properties in either:
- conf/logging.properties
- SystemInstance.get().getProperties() // the overrides
If the above is true, the user likely wants them respected and we could default
to Log4j using the old setup as before.
I restored our old log4j functionality, but currently it doesn't get chosen
unless 'openejb.log.factory' is set. When it isn't set, we default based on
the above conditions.
Don't have time to work on it, but something along those lines would be welcome.
-David