Are there other changes to HEAD that should have been deprecation warnings in 1.2.8 other than Category? The only thing I can recall off the top of my head is LocationInfo.
Generally speaking, your point is really an excellent one. As Brian W. Kernighan and Rob Pike put in in their remarkable book entitled "The Practice of Programming":
Don't make the same mistake twice. After you fix a bug, ask whether you might have made the same mistake somewhere else.
With regards to the specifics, when you mention LocationInfo, I presume you are concerned about the fact that the LocationInfo class has been moved to another package, from o.a.l.spi to o.a.l.spi.location. However, the Location class is internal to log4j. It is not part of the public user interface of log4j.
Our policy has always been to be very careful to preserve compatibility between various log4j versions with respect to the user API of log4j. There is no such guarantee with respect to the internals of log4j. The SPI package was created to signal to both users and developers that its contents are internal to log4j.
See also http://logging.apache.org/log4j/docs/faq.html#4.1
We have already had a discussion about Location info: http://marc.theaimsgroup.com/?t=109527464400003&r=1&w=2
I think it is important to realize that backward compatibility cannot be guaranteed for log4j internals. If we fix the internals in stone than I think it will be impossible for us to have the log4j project evolve. The Category->Logger and Priority->Level
I understand Category could be considered a special case, and I'll vote +1 - under the assumption that changes to public methods/classes that were removed between 1.2.8 and HEAD can be marked deprecated as well - at least in org.apache.log4j and org.apache.log4j.spi.
For consistency sake, I'd like us to be more diligent in only changing public methods & classes that were marked deprecated in a previous release.
-----Original Message----- From: Ceki Gülcü [mailto:[EMAIL PROTECTED] Sent: Fri 10/29/2004 2:26 PM To: [EMAIL PROTECTED] Cc: Subject: [POLL] a 1.2.9 release?
Hi all,
For reasons explained at http://www.qos.ch/logging/replacingCategory.html,
in log4j version 1.2.x, the Category class was not tagged with the
@deprecated javadoc tag in the source code. This voluntary omission
led to a situation where users could still refer to the Category class
without deprecation warnings being generated by the java
compiler. Consequently, some users unfortunately still continue to
refer to the Category class.
We have marked in red and in bold that users should drop references to
the Category class and use Logger instead. However, us shouting about
this important point does not tell the java compiler to enforce
it. Since we cannot mark the Category class as @deprecated in the
javadocs, the only compiler-enforced way of pushing users to migrate
to the Logger class is to tag those methods in the Category class that
have Category as their return value in their signature. These methods
are:
static public Category getRoot(); static public Category getInstance(String name); static public Category getInstance(Class clazz);
Unfortunately, log4j versions up to and including 1.2.8 did not mark
these methods as deprecated. As such, I would like to release a new
version in the 1.2 series, namely 1.2.9, which will mark these methods
as deprecated. Would you approve such a release?
Assuming log4j version 1.2.9 is approved, then we can assume that users of 1.2.9 will only refer to the Logger class. If that is the case, their code will compile and run without change with log4j 1.3 even if the Category class is removed.
-- Ceki Gülcü
For log4j documentation consider "The complete log4j manual" http://www.qos.ch/shop/products/eclm/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Ceki Gülcü
For log4j documentation consider "The complete log4j manual"
http://www.qos.ch/shop/products/eclm/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]