<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56:36 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-2203] Remove org.slf4j.impl.StaticLoggerBinder check</title>
                <link>https://jira.mongodb.org/browse/JAVA-2203</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;com.mongodb.diagnostics.logging.Loggers class checks for the presence of both the slf4j-api and slf4j implementation before enabling slf4j logging. The second check should not be performed since org.slf4j.impl.StaticLoggerBinder might not be accessible in every case (OSGi bundles which want to hide slf4j implementation). And in any case, having SLF4J API without an implementation should be an SLF4J issue which it handles well (displaying warnings etc.). MongoDB Java driver should only check for the presence of SLF4J API, and use it if present. Patch to remove the second test is attached.&lt;/p&gt;</description>
                <environment></environment>
        <key id="291211">JAVA-2203</key>
            <summary>Remove org.slf4j.impl.StaticLoggerBinder check</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="hsahmed@gmail.com">Hesham Ahmed</reporter>
                        <labels>
                    </labels>
                <created>Fri, 3 Jun 2016 00:37:27 +0000</created>
                <updated>Sat, 6 Jan 2018 19:01:36 +0000</updated>
                            <resolved>Sat, 6 Jan 2018 19:01:36 +0000</resolved>
                                    <version>3.0.0</version>
                                    <fixVersion>3.7.0</fixVersion>
                                    <component>Monitoring</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1767010" author="xgen-internal-githook" created="Sat, 6 Jan 2018 18:58:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jan Peter Stotz&apos;, &apos;username&apos;: &apos;jpstotz&apos;, &apos;email&apos;: &apos;jan-peter.stotz@sit.fraunhofer.de&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2203&quot; title=&quot;Remove org.slf4j.impl.StaticLoggerBinder check&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2203&quot;&gt;&lt;del&gt;JAVA-2203&lt;/del&gt;&lt;/a&gt;: Use SLF4J if org.slf4j.Logger class is available.  Remove check for org.slf4j.impl.StaticLoggerBinder.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/9f0cadd8d7b47e39965d4c19b1aea02abe7f40c3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/9f0cadd8d7b47e39965d4c19b1aea02abe7f40c3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1765015" author="jeff.yemin" created="Thu, 4 Jan 2018 15:44:09 +0000"  >&lt;p&gt;Changes requested to &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/pull/408&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;pull request&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1651791" author="hsahmed@gmail.com" created="Fri, 18 Aug 2017 19:20:49 +0000"  >&lt;p&gt;I fail to understand why this is still open. It&apos;s a very small change that doesn&apos;t affect anything else or cause exceptions. The patch I have attached makes the driver use the correct method of SLF4J as is recommended by SLF4J library developers. If the person has an unused slf4j-api.jar in their classpath without an implementation, they will still get the &quot;No SLF4J providers were found&quot; warning which should be enough to point the users to the right direction.&lt;/p&gt;</comment>
                            <comment id="1650744" author="jeff.yemin" created="Thu, 17 Aug 2017 18:09:23 +0000"  >&lt;p&gt;According to &lt;a href=&quot;https://www.slf4j.org/api/org/slf4j/impl/StaticLoggerBinder.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.slf4j.org/api/org/slf4j/impl/StaticLoggerBinder.html&lt;/a&gt;, the static binder mechanism is deprecated as of the 1.8 release of SLF4J.  So regardless of OSGi something needs to be done.&lt;/p&gt;</comment>
                            <comment id="1386312" author="hsahmed@gmail.com" created="Fri, 16 Sep 2016 15:14:57 +0000"  >&lt;p&gt;In my opinion mandating the slf4j implementation goes against the slf4j design.&lt;/p&gt;</comment>
                            <comment id="1386308" author="hsahmed@gmail.com" created="Fri, 16 Sep 2016 15:11:01 +0000"  >&lt;p&gt;SLF4J API is designed to handle missing impl cases. From the SLF4J page:&lt;/p&gt;

&lt;p&gt;Note that SLF4J-enabling your library implies the addition of only a single mandatory dependency, namely slf4j-api.jar. If no binding is found on the class path, then SLF4J will default to a no-operation implementation.&lt;/p&gt;</comment>
                            <comment id="1385931" author="jeff.yemin" created="Fri, 16 Sep 2016 01:13:49 +0000"  >&lt;p&gt;Hi Hesham,&lt;/p&gt;

&lt;p&gt;Apologies for not getting back to you sooner.  I hope this issue hasn&apos;t caused you a lot of trouble.&lt;/p&gt;

&lt;p&gt;My concern about removing the check at this point is that there may be some users who, through some indirect dependency, have an unused slf4j-api.jar in their classpath.  If we remove the check then those users will no longer get any logging.  &lt;/p&gt;

&lt;p&gt;Let me know your thoughts on this.&lt;/p&gt;


&lt;p&gt;Thanks,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="124569" name="Loggers.patch" size="504" author="hsahmed@gmail.com" created="Fri, 3 Jun 2016 00:37:27 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr94db:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>