Well, I was thinking about something we could do quickly for 1.2 without messing around with the existing code at all.  All the stuff I talked about would be in the wrapper class itself and would not require any changes in the configurator or appender classes.  Maybe changes are required in other places too.  You could choose to use the wrapper or not.  No one wants to make a change like this in the 13th version of the 1.2 release that will affect the log4j user population as a whole.  But as I said, I hate leaving it out there hanging.  I think that we have not handled this one well, for whatever reasons.

I would much rather get on with 1.3 and do it the right way there. 

-Mark

On 11/4/05, Endre Stølsvik <[EMAIL PROTECTED]> wrote:
On Thu, 3 Nov 2005, Mark Womack wrote:

| The wrapper class would only be in 1.2 and really only used to avoid making
| everyone take the "big" change in the new version of 1.2. I am assuming that
| we will do the right thing in 1.3 to not require the use of the wrapper
| class.
|
| The wrapper class would need to have a special (and potentially clumsy)
| syntax for configuring the wrapper class. Something like:
|
| <parameter key="property" value="(key)(value)"/>
|
| where key and value would be the property name and value to set. The
| setProperty method in the wrapper class would parse and set the
| property/value in the wrapped class. Unless there is something we can do
| more with bytecode manipulation.

Couldn't one "just" make a special-case for the wrapper? So that if the
configuration parts of log4j saw the wrapper class specified, if would
-not- set the properties on the wrapper, but on the wrappee? (except for
maybe special ones, e.g. starting with "Wrapper:" for key..)

This brings me to the next point: what about "just" introducing a new
Appender API (a new interface, that is)? In this way, the log4j core
(configuration system, basically) could "sense" whether it was an old
Appender (simply instanceof), and thus automatically wrap it, and set the
properties in the way mentioned above (on the wrappee), or if it was the
new Appender2, it would configure and use it natively?

The old threads on this list about the subject are also interesting. For
my part, the coarse-level synching seems the most worrisome, and Elias
suggestions here for a way more fine grained synching sounds very
interesting. Contended synchs (which you'd have -often- given the way I've
understood log4j actually works) are rather expensive, and something you'd
get a lot in a very multi-threaded application as a webapplication is.

Just my 2 øre.

Regards,
Endre.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to