<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:25 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-932] How to disable driver logging</title>
                <link>https://jira.mongodb.org/browse/JAVA-932</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;The following code can be used to change the level at which events are logged by clients of the driver ...&lt;/p&gt;

&lt;p&gt;import java.util.logging.Logger;&lt;br/&gt;
Logger mongoLogger = Logger.getLogger( &quot;com.mongodb&quot; );&lt;br/&gt;
mongoLogger.setLevel(Level.SEVERE);&lt;/p&gt;

&lt;p&gt;However, rather than have to write this code in many different places, I&apos;d really like to have the ability to set the logging level in a single place. For example, the Amazon SDK, hc.apache and others allow me to do this in a log4j.properties file like so:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Uncomment to turn off all logging from the SDK&lt;br/&gt;
log4j.logger.com.amazonaws=OFF&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;More examples &amp;#8211; adjust to see more / less logging&lt;br/&gt;
#log4j.logger.com.amazonaws.ec2=WARN&lt;br/&gt;
#log4j.logger.httpclient.wire=WARN&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;log4j.logger.org.apache.http=OFF&lt;br/&gt;
#log4j.logger.org.apache.http=DEBUG&lt;br/&gt;
#log4j.logger.org.apache.http.wire=ERROR&lt;br/&gt;
#log4j.logger.org.apache.http.impl.conn=ERROR&lt;br/&gt;
#log4j.logger.org.apache.http.impl.client=ERROR&lt;br/&gt;
#log4j.logger.org.apache.http.client=ERROR&lt;/p&gt;

&lt;p&gt;Is there any way to do something like this with the mongoDB java driver?&lt;/p&gt;
</description>
                <environment></environment>
        <key id="86915">JAVA-932</key>
            <summary>How to disable driver logging</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="-1">Unassigned</assignee>
                                    <reporter username="beast">Alex Ryan</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Aug 2013 23:29:32 +0000</created>
                <updated>Wed, 11 Sep 2019 19:12:34 +0000</updated>
                            <resolved>Tue, 23 Jun 2015 02:35:14 +0000</resolved>
                                    <version>2.11.2</version>
                                                    <component>Error Handling</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="525250" author="jeff.yemin" created="Thu, 27 Mar 2014 22:05:25 +0000"  >&lt;p&gt;In 3.0 the driver will log to SLF4J if it&apos;s present on the class path.  SLF4J integrates better with log4j, and so I think will give you a better solution to this problem.  As it is now, the driver uses JUL (java.util.logging), which has poor integration with log4j.  Specifically, I don&apos;t think you can control the logging level for JUL via log4j properties &lt;/p&gt;</comment>
                            <comment id="465635" author="jeff.yemin" created="Wed, 4 Dec 2013 18:56:29 +0000"  >&lt;p&gt;Are you saying that this?&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;log4j.logger.com.mongodb=SEVERE&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;has no effect?  If so, we can investigate. &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <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|hrgalb:</customfieldvalue>

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