OK. So you are saying that the 2.1 impl can only run with the 2.1 API but the API can run with a 2.0 or 2.1 impl. Yes, I guess that makes sense.
I was expecting something more along the lines of something being added to the API that required a corresponding change to the impl. That would not require 3.0, but would require 2.1 without 2.0. Ralph On Oct 8, 2014, at 8:24 PM, Matt Sicker <[email protected]> wrote: > Oh, and nothing was removed from the 2.0 API, so it's really backwards > compatible (even a random protected method from util). I would imagine a > backwards incompatible API change would warrant 3.0, but maybe I'm just > confused? > > On 8 October 2014 22:23, Matt Sicker <[email protected]> wrote: > There are additions to the API in 2.1 that log4j-core use (e.g., several > things added to util), so I figured it made sense to mark log4j-core as > requiring log4j-api 2.1+. Isn't that the point? > > I also left the log4j-to-slf4j API version at 2.0.0 since that's still > compatible with the 2.0 API. > > On 8 October 2014 22:10, Ralph Goers <[email protected]> wrote: > Also, if the API does not change then the version number does not need to be > bumped even though we have moved on to 2.2, 2.3, etc. So if nothing really > changed to the API in 2.1 the version number can be left at 2.0.0. > > Ralph > > On Oct 8, 2014, at 8:05 PM, Ralph Goers <[email protected]> wrote: > >> Yes, I am aware of that. I believe I wrote the code. As I said, the >> implication of the current setting is that the API will can bind with either >> a 2.0.0 implementation or a 2.1.0 implementation and will work fine. If the >> API was changed for 2.1 in such a way that that is true then fine. But if >> new stuff was added that requires an implementation that matches the 2.1 API >> then only “2.1.0” should be in the COMPATIBLE_API_VERSIONS list. >> >> Ralph >> >> On Oct 8, 2014, at 6:41 PM, Matt Sicker <[email protected]> wrote: >> >>> ProviderUtil.validVersion(String) checks all the values from >>> COMPATIBLE_API_VERSIONS for compatibility, not just one. For reference: >>> >>> private static final String[] COMPATIBLE_API_VERSIONS = { >>> "2.0.0", "2.1.0" >>> }; >>> >>> private static boolean validVersion(final String version) { >>> for (final String v : COMPATIBLE_API_VERSIONS) { >>> if (version.startsWith(v)) { >>> return true; >>> } >>> } >>> return false; >>> } >>> >>> >>> On 8 October 2014 18:41, Ralph Goers <[email protected]> wrote: >>> Log4j API is trying to bind with an implementation. It wants to bind only >>> with an implementation that is compatible with the API. To my >>> understanding that would mean it can only bind with a 2.1.0 implementation. >>> >>> Ralph >>> >>> On Oct 8, 2014, at 2:06 PM, Matt Sicker <[email protected]> wrote: >>> >>>> I believe this means that log4j-core requires API version 2.1.0. log4j-api >>>> 2.1 works with providers that require 2.0.0 or 2.1.0. >>>> >>>> On 8 October 2014 12:22, Ralph Goers <[email protected]> wrote: >>>> I am not sure this change is correct. If a logging implementation is >>>> provided that is at version 2.0 is it going to work with the 2.1 API? If >>>> not then 2.1 should be the only compatible version (and skip 2.0 >>>> implementations). >>>> >>>> Ralph >>>> >>>> >>>> Begin forwarded message: >>>> >>>>> From: [email protected] >>>>> Subject: [2/2] git commit: [LOG4J2-845] Add API version 2.1.0 to >>>>> ProviderUtil. >>>>> Date: September 21, 2014 at 9:44:27 AM MST >>>>> To: [email protected] >>>>> Reply-To: [email protected] >>>>> >>>>> [LOG4J2-845] Add API version 2.1.0 to ProviderUtil. >>>>> >>>>> >>>>> Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo >>>>> Commit: >>>>> http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/a26dab9b >>>>> Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/a26dab9b >>>>> Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/a26dab9b >>>>> >>>>> Branch: refs/heads/master >>>>> Commit: a26dab9b460b3430f59935163dd6c695b8d9ba6a >>>>> Parents: 93fee7f >>>>> Author: Matt Sicker <[email protected]> >>>>> Authored: Sun Sep 21 11:44:28 2014 -0500 >>>>> Committer: Matt Sicker <[email protected]> >>>>> Committed: Sun Sep 21 11:44:28 2014 -0500 >>>>> >>>>> ---------------------------------------------------------------------- >>>>> .../main/java/org/apache/logging/log4j/util/ProviderUtil.java | 2 +- >>>>> log4j-core/src/main/resources/META-INF/log4j-provider.properties | 4 ++-- >>>>> src/changes/changes.xml | 3 +++ >>>>> 3 files changed, 6 insertions(+), 3 deletions(-) >>>>> ---------------------------------------------------------------------- >>>>> >>>>> >>>>> http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a26dab9b/log4j-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java >>>>> ---------------------------------------------------------------------- >>>>> diff --git >>>>> a/log4j-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java >>>>> b/log4j-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java >>>>> index 7fbbfd5..27237f0 100644 >>>>> --- >>>>> a/log4j-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java >>>>> +++ >>>>> b/log4j-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java >>>>> @@ -41,7 +41,7 @@ public final class ProviderUtil { >>>>> private static final String API_VERSION = "Log4jAPIVersion"; >>>>> >>>>> private static final String[] COMPATIBLE_API_VERSIONS = { >>>>> - "2.0.0" >>>>> + "2.0.0", "2.1.0" >>>>> }; >>>>> >>>>> private static final Logger LOGGER = StatusLogger.getLogger(); >>>>> >>>>> http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a26dab9b/log4j-core/src/main/resources/META-INF/log4j-provider.properties >>>>> ---------------------------------------------------------------------- >>>>> diff --git >>>>> a/log4j-core/src/main/resources/META-INF/log4j-provider.properties >>>>> b/log4j-core/src/main/resources/META-INF/log4j-provider.properties >>>>> index b13b0b8..ae4a306 100644 >>>>> --- a/log4j-core/src/main/resources/META-INF/log4j-provider.properties >>>>> +++ b/log4j-core/src/main/resources/META-INF/log4j-provider.properties >>>>> @@ -14,5 +14,5 @@ >>>>> # limitations under the License. >>>>> >>>>> LoggerContextFactory = >>>>> org.apache.logging.log4j.core.impl.Log4jContextFactory >>>>> -Log4jAPIVersion = 2.0.0 >>>>> -FactoryPriority= 10 >>>>> \ No newline at end of file >>>>> +Log4jAPIVersion = 2.1.0 >>>>> +FactoryPriority= 10 >>>>> >>>>> http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a26dab9b/src/changes/changes.xml >>>>> ---------------------------------------------------------------------- >>>>> diff --git a/src/changes/changes.xml b/src/changes/changes.xml >>>>> index c201bb3..319cb64 100644 >>>>> --- a/src/changes/changes.xml >>>>> +++ b/src/changes/changes.xml >>>>> @@ -24,6 +24,9 @@ >>>>> </properties> >>>>> <body> >>>>> <release version="2.1" date="2014-??-??" description="Bug fixes and >>>>> enhancements"> >>>>> + <action issue="LOG4J2-845" dev="mattsicker" type="update"> >>>>> + Add Log4j API 2.1.0 and update Log4j Core likewise. >>>>> + </action> >>>>> <action issue="LOG4J2-833" dev="rpopma" type="fix"> >>>>> Documentation: add Runtime Dependencies link to left nav-bar on >>>>> site. >>>>> </action> >>>>> >>>> >>>> >>>> >>>> >>>> -- >>>> Matt Sicker <[email protected]> >>> >>> >>> >>> >>> -- >>> Matt Sicker <[email protected]> >> > > > > > -- > Matt Sicker <[email protected]> > > > > -- > Matt Sicker <[email protected]>
