You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Mark Womack <wo...@adobe.com> on 2005/07/01 18:46:42 UTC
RE: [logging] Log4J forward compatibility with version 1.3
[getting ready to duck rotten eggs and tomatoes...]
What about just doing what the deprecation warning has been saying for all
of the 1.2 release and getting rid of Category and Priority altogether in
the 1.3 release? I think everyone has been fairly warned about it.
Simon, is there a pending release of JCL that is waiting for an answer to
this issue? It is on my list of items to look at in more detail this
weekend. Don't know if I will have an answer to suggest, but I hope to be
more familiar with it.
-Mark
> -----Original Message-----
> From: Simon Kitching [mailto:skitching@apache.org]
> Sent: Sunday, June 19, 2005 11:12 PM
> To: Log4J Developers List
> Subject: Re: [logging] Log4J forward compatibility with version 1.3
>
> On Sat, 2005-06-18 at 16:23 +0200, Ceki Gülcü wrote:
> > I see your point. Assuming everyone involved in log4j is cognizant of
> > this problem, I think you can expect current arrangement of Logger,
> > Category, Level etc. to persist through until 1.3 final.
>
> In the 1.3alpha6 release has swapped the hierarchy positions for Level
> and Priority.
>
> But it hasn't swapped Category and Logger. Is this still in the plan for
> 1.3? If so, when is this work likely to be done?
>
> Regards,
>
> Simon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
Re: [logging] Log4J forward compatibility with version 1.3
Posted by Curt Arnold <ca...@houston.rr.com>.
On Jul 1, 2005, at 6:18 PM, Simon Kitching wrote:
> On Fri, 2005-07-01 at 16:13 -0700, Mark Womack wrote:
>
>> This all seems sane to me. JCL will provide a way (eventually) to
>> choose
>> between the Log4j12Logger and the future Log4j13Logger? There is
>> a request
>> to add a method of determining the log4j version which we will be
>> implementing for the 1.3 version. I'm sure that will help.
>>
>
> The JCl code tests for version by checking:
> Priority.class.isAssignableFrom(Level.class)
>
> As long as this isn't true in 1.3 everything is fine. Note that it's
> also fine for the Priority class to be missing; NoClassDefFound for
> this
> expression also is taken as not-1.2 :-)
I'd much rather prefer to provide some other pr additional mechanism
since my gut feeling is that will will have to restore the 1.2
relationship between these classes (Level extends Priority) in order
to prevent wide-spread VerifyError when using log4j 1.3 with code
compiled against log4j 1.2.
There are a couple of scenarios:
1) log4j 1.3 is sufficiently binary compatible with log4j 1.2 that
there is no need or desire for a log4j 1.3 specific wrapper
2) log4j 1.3 is sufficiently binary compatible that there is no need,
but there is a desire for a log4j 1.3 specific wrapper to support
some feature or optimization.
3) log4j 1.3 isn't sufficiently binary compatible and needs a log4j
1.3 specific wrapper and Priority extends Level (current CVS HEAD).
4) log4j 1.3 isn't sufficiently binary compatible and needs a log4j
1.3 specific wrapper and Level extends Priority.
As long as we stay away from scenario 4, the current approach in
Log4J12Logger would be work okay. It would work with log4j 1.2 and a
hypothetical binary compatible log4j 1.3 and quickly fail with the
previous log4j 1.3 alphas. However, I'd hate to paint myself a
corner until scenario 4 with the initial log4j 1.3 release can be
totally ruled out.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
RE: [logging] Log4J forward compatibility with version 1.3
Posted by Simon Kitching <sk...@apache.org>.
On Fri, 2005-07-01 at 16:13 -0700, Mark Womack wrote:
> This all seems sane to me. JCL will provide a way (eventually) to choose
> between the Log4j12Logger and the future Log4j13Logger? There is a request
> to add a method of determining the log4j version which we will be
> implementing for the 1.3 version. I'm sure that will help.
The JCl code tests for version by checking:
Priority.class.isAssignableFrom(Level.class)
As long as this isn't true in 1.3 everything is fine. Note that it's
also fine for the Priority class to be missing; NoClassDefFound for this
expression also is taken as not-1.2 :-)
Regards,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
RE: [logging] Log4J forward compatibility with version 1.3
Posted by Mark Womack <wo...@adobe.com>.
This all seems sane to me. JCL will provide a way (eventually) to choose
between the Log4j12Logger and the future Log4j13Logger? There is a request
to add a method of determining the log4j version which we will be
implementing for the 1.3 version. I'm sure that will help.
-Mark
> -----Original Message-----
> From: Simon Kitching [mailto:skitching@apache.org]
> Sent: Friday, July 01, 2005 4:05 PM
> To: 'Log4J Developers List'
> Subject: RE: [logging] Log4J forward compatibility with version 1.3
>
> JCL 1.1 is likely to be released within the next 6 weeks or so (warning:
> crystal-ball-gazing prediction). So log4j 1.3 won't be out.
>
> And the general consensus is that we will *not* release code based on
> compiling against 1.3 alpha. Instead JCL will provide a Log4j12Logger
> class that specifically supports log4j 1.2 stuff. When log4j 1.3 is
> released the plan is to release an update to JCL with a Log4j13Logger
> class.
>
> So whether you do all the hierarchy-swapping or simply delete
> Category/Priority doesn't make any difference to JCL. The only benefit
> to the old plan is that it was possible to provide one class that worked
> with both libs but we're not doing that as:
> * it means releasing now with code compiled against the alpha, or
> * waiting for log4j 1.3 which still appears to be quite a way off.
>
> Regards,
>
> Simon
>
> On Fri, 2005-07-01 at 09:46 -0700, Mark Womack wrote:
> > [getting ready to duck rotten eggs and tomatoes...]
> >
> > What about just doing what the deprecation warning has been saying for
> all
> > of the 1.2 release and getting rid of Category and Priority altogether
> in
> > the 1.3 release? I think everyone has been fairly warned about it.
> >
> > Simon, is there a pending release of JCL that is waiting for an answer
> to
> > this issue? It is on my list of items to look at in more detail this
> > weekend. Don't know if I will have an answer to suggest, but I hope to
> be
> > more familiar with it.
> >
> > -Mark
> >
> > > -----Original Message-----
> > > From: Simon Kitching [mailto:skitching@apache.org]
> > > Sent: Sunday, June 19, 2005 11:12 PM
> > > To: Log4J Developers List
> > > Subject: Re: [logging] Log4J forward compatibility with version 1.3
> > >
> > > On Sat, 2005-06-18 at 16:23 +0200, Ceki Gülcü wrote:
> > > > I see your point. Assuming everyone involved in log4j is cognizant
> of
> > > > this problem, I think you can expect current arrangement of Logger,
> > > > Category, Level etc. to persist through until 1.3 final.
> > >
> > > In the 1.3alpha6 release has swapped the hierarchy positions for Level
> > > and Priority.
> > >
> > > But it hasn't swapped Category and Logger. Is this still in the plan
> for
> > > 1.3? If so, when is this work likely to be done?
> > >
> > > Regards,
> > >
> > > Simon
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
RE: [logging] Log4J forward compatibility with version 1.3
Posted by Simon Kitching <sk...@apache.org>.
JCL 1.1 is likely to be released within the next 6 weeks or so (warning:
crystal-ball-gazing prediction). So log4j 1.3 won't be out.
And the general consensus is that we will *not* release code based on
compiling against 1.3 alpha. Instead JCL will provide a Log4j12Logger
class that specifically supports log4j 1.2 stuff. When log4j 1.3 is
released the plan is to release an update to JCL with a Log4j13Logger
class.
So whether you do all the hierarchy-swapping or simply delete
Category/Priority doesn't make any difference to JCL. The only benefit
to the old plan is that it was possible to provide one class that worked
with both libs but we're not doing that as:
* it means releasing now with code compiled against the alpha, or
* waiting for log4j 1.3 which still appears to be quite a way off.
Regards,
Simon
On Fri, 2005-07-01 at 09:46 -0700, Mark Womack wrote:
> [getting ready to duck rotten eggs and tomatoes...]
>
> What about just doing what the deprecation warning has been saying for all
> of the 1.2 release and getting rid of Category and Priority altogether in
> the 1.3 release? I think everyone has been fairly warned about it.
>
> Simon, is there a pending release of JCL that is waiting for an answer to
> this issue? It is on my list of items to look at in more detail this
> weekend. Don't know if I will have an answer to suggest, but I hope to be
> more familiar with it.
>
> -Mark
>
> > -----Original Message-----
> > From: Simon Kitching [mailto:skitching@apache.org]
> > Sent: Sunday, June 19, 2005 11:12 PM
> > To: Log4J Developers List
> > Subject: Re: [logging] Log4J forward compatibility with version 1.3
> >
> > On Sat, 2005-06-18 at 16:23 +0200, Ceki Gülcü wrote:
> > > I see your point. Assuming everyone involved in log4j is cognizant of
> > > this problem, I think you can expect current arrangement of Logger,
> > > Category, Level etc. to persist through until 1.3 final.
> >
> > In the 1.3alpha6 release has swapped the hierarchy positions for Level
> > and Priority.
> >
> > But it hasn't swapped Category and Logger. Is this still in the plan for
> > 1.3? If so, when is this work likely to be done?
> >
> > Regards,
> >
> > Simon
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
Re: [logging] Log4J forward compatibility with version 1.3
Posted by Curt Arnold <ca...@houston.rr.com>.
On Jul 1, 2005, at 11:46 AM, Mark Womack wrote:
> [getting ready to duck rotten eggs and tomatoes...]
>
> What about just doing what the deprecation warning has been saying
> for all
> of the 1.2 release and getting rid of Category and Priority
> altogether in
> the 1.3 release? I think everyone has been fairly warned about it.
>
> Simon, is there a pending release of JCL that is waiting for an
> answer to
> this issue? It is on my list of items to look at in more detail this
> weekend. Don't know if I will have an answer to suggest, but I
> hope to be
> more familiar with it.
>
> -Mark
If there was a way of doing that that did not break binary
compatibility with applications that used 1.2 but did not reference
Category or Priority, I'd might consider it, but I'm not sure that it
could be done. The only safe path I see to possibly reaching that is
to continue trying to get to binary compatibility with the log4j
1.2.x unit tests and when that is successful, see if they can be
eliminated entirely without breaking binary compatibility.
The path I see (or hope is there) out of this swamp is:
1. Get the log4j 1.2 unit tests successfully compiling against CVS
HEAD. With the exceptions of DRFATestCase (which doesn't test the
external API) and the MyPatternLayout/MyPatternParser classes
supporting PatternLayoutTest.test14 which tests custom pattern
parsers which may be an extremely rare use case, I've got this
working locally and should commit soon.
2. Get the log4j 1.2 unit tests passing against the CVS HEAD when
compiled against the CVS HEAD. The most significant roadblock to
this is internal logging messages polluting the output. My intended
approach to this is to restore the log4j 1.2 behavior (info and
higher to the console unless debug="true" on configuration) unless
specifically overridden in the configuration file.
3. Get the log4j 1.2 unit tests passed against the CVS HEAD when
compiled against log4j 1.2. I assume this will require reverting the
inheritance relationship between Category and Logger and Priority and
Level. When we've got this working, then we can do what-if's to see
if we can totally eliminate the Category and Priority without raising
the dreaded VerifyError exception on class load.
As far as I can tell (but I haven't did any significant research), it
is unlikely that an arbitrary app compiled against log4j 1.2 would
just work if you dropped the current CVS HEAD in the classpath.
However, mileage may vary depending on the JVM. I think we would
like to get to the point that almost all applications would. At
least that is what we have been historically saying about the CVS HEAD.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
RE: [logging] Log4J forward compatibility with version 1.3
Posted by Yoav Shapira <yo...@MIT.EDU>.
Hi,
> What about just doing what the deprecation warning has been saying for all
> of the 1.2 release and getting rid of Category and Priority altogether in
> the 1.3 release? I think everyone has been fairly warned about it.
I've been itching to do just that. +1.
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management / School of Engineering
Cambridge, MA USA
yoavsh@sloan.mit.edu / yoavs@computer.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org