: Do you have any pointers on how to change the underlying framework? I
: don't see anything like that in:
: http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/overview.html
: or other obvious (google) places to look
The key bit is the LogManager ... you can specify any concrete
implementation you want using the java.util.logging.manager system
property ... in theory you could define a Log4JLogManager that proxies to
the various underlying log4j classes. I don't know that i've ever seen a
robust reusbale one, but i have seen people wrap log4j handlers up so
they can be used as JDK logging handlers.
As far as i can tell, the main reason for third-party logging abstractions
(like slf4j and commons-logging, etc..) at this point is supporting older
JDKs and providing simplified APIs ... but i freely admit, there could be
other benefits i'm missing.
: I have been integrating solr with a legacy system tied to log4j - i
: have two logging configurations - a pain, but obviously not that big
: of deal.
you're also in a somewhat unique scenerio becuse you aren't running Solr
in a servlet container right?
We've run into a similar issue, where we have a mix of webapps. All
of the non-Solr guys use Log4J with a rotating daily appender, but
since this isn't supported by the default JDK logger, there's a
mismatch in log files being produced.
I'd looked at doing what you mention above (wrapping Log4J with a
LogManager), and it isn't a big deal but just a bit of an annoyance.
I did search for a reusable implementation of this and also didn't
find anything that looked good to me.
From what i've seen, a couple of the
heavy hitters seem to have their own custom logging configuration
mechanism, which appears to work regardless of wehter you are using log4j
or jdk logging -- presumably because they implement their own LogManager
(or equivilent) for each.
Since we use Resin, and Resin does support what you're describing,
this is the approach I'm taking short-term.
But for our embedded Jetty usage, I'll be back in the same situation as Ryan.
Not that I'm arguing for use of Apache Commons Logging (I've had
enough fun with that in Nutch), just commenting on the discussion
here.
-- Ken
--
Ken Krugler
Krugle, Inc.
+1 530-210-6378
"Find Code, Find Answers"