logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: [2/2] git commit: [LOG4J2-845] Add API version 2.1.0 to ProviderUtil.
Date Thu, 09 Oct 2014 03:23:02 GMT
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 <ralph.goers@dslextreme.com> 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 <ralph.goers@dslextreme.com>
> 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 <boards@gmail.com> 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 <ralph.goers@dslextreme.com> 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 <boards@gmail.com> 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 <ralph.goers@dslextreme.com> 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: *mattsicker@apache.org
>>> *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: *commits@logging.apache.org
>>> *Reply-To: *dev@logging.apache.org
>>>
>>> [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 <mattsicker@apache.org>
>>> Authored: Sun Sep 21 11:44:28 2014 -0500
>>> Committer: Matt Sicker <mattsicker@apache.org>
>>> 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 <boards@gmail.com>
>>
>>
>>
>
>
> --
> Matt Sicker <boards@gmail.com>
>
>
>
>


-- 
Matt Sicker <boards@gmail.com>

Mime
View raw message