<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:58:09 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>[CXX-85] C++ driver DBClientReplicaSet pollutes stdout with logging information</title>
                <link>https://jira.mongodb.org/browse/CXX-85</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;The C++ driver&apos;s DBClientReplicaSet seems to pollute our stdout with logging information:&lt;/p&gt;

&lt;p&gt;Fri Apr 22 16:02:25 updated set (tsukku) to: tsukku/localhost:27017,dev.tsukku.eu:27017&lt;br/&gt;
Fri Apr 22 16:02:25 updated set (tsukku) to: tsukku/localhost:27017,dev.tsukku.eu:27017,dev.tsukku.eu:27018&lt;br/&gt;
Fri Apr 22 16:02:25 &lt;span class=&quot;error&quot;&gt;&amp;#91;ReplicaSetMonitorWatcher&amp;#93;&lt;/span&gt; starting&lt;/p&gt;

&lt;p&gt;I assume it&apos;s due to a misconfiguration in the logging commands, since these shouldn&apos;t be emitted to stdout.&lt;/p&gt;</description>
                <environment></environment>
        <key id="16270">CXX-85</key>
            <summary>C++ driver DBClientReplicaSet pollutes stdout with logging information</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="-1">Unassigned</assignee>
                                    <reporter username="solatis">Leon Mergen</reporter>
                        <labels>
                            <label>cxxmove</label>
                            <label>legacy-cxx</label>
                    </labels>
                <created>Fri, 22 Apr 2011 16:09:27 +0000</created>
                <updated>Sun, 4 May 2014 19:32:22 +0000</updated>
                            <resolved>Tue, 22 Apr 2014 21:48:32 +0000</resolved>
                                                    <fixVersion>legacy-0.8.0</fixVersion>
                                                        <votes>2</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="559536" author="xgen-internal-githook" created="Tue, 22 Apr 2014 21:48:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;acmorrow&apos;, u&apos;name&apos;: u&apos;Andrew Morrow&apos;, u&apos;email&apos;: u&apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-85&quot; title=&quot;C++ driver DBClientReplicaSet pollutes stdout with logging information&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-85&quot;&gt;&lt;del&gt;CXX-85&lt;/del&gt;&lt;/a&gt; Add an example of how to inject a custom logger&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/9d4eebcb0b51f0f9db7c8a745bce8bd419bdf970&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/9d4eebcb0b51f0f9db7c8a745bce8bd419bdf970&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="559535" author="xgen-internal-githook" created="Tue, 22 Apr 2014 21:48:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;acmorrow&apos;, u&apos;name&apos;: u&apos;Andrew Morrow&apos;, u&apos;email&apos;: u&apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-85&quot; title=&quot;C++ driver DBClientReplicaSet pollutes stdout with logging information&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-85&quot;&gt;&lt;del&gt;CXX-85&lt;/del&gt;&lt;/a&gt; Strip server specific logging and default driver to not log&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/4cf5b8d51be70a5c9bb53c4a34de4fe9b57e3dfe&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/4cf5b8d51be70a5c9bb53c4a34de4fe9b57e3dfe&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="559429" author="acm" created="Tue, 22 Apr 2014 20:44:08 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/63&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/63&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="341036" author="hixxy" created="Tue, 21 May 2013 21:59:57 +0000"  >&lt;p&gt;I&apos;m now using this ugly work-around for this problem:&lt;/p&gt;

&lt;p&gt;  FILE* nullLog = fopen(&quot;/dev/null&quot;, &quot;w&quot;);&lt;br/&gt;
  if (nullLog != nullptr) mongo::Logstream::setLogFile(nullLog);&lt;/p&gt;</comment>
                            <comment id="338612" author="hixxy" created="Sat, 18 May 2013 05:08:11 +0000"  >&lt;p&gt;I agree with this for sure. It makes it pretty much impossible to provide any level of polish to an application using mongodb and replica sets that also uses stdout itself. &lt;/p&gt;

&lt;p&gt;It should be possible to make the driver not do any output at all to stdout or stderr.&lt;/p&gt;</comment>
                            <comment id="29525" author="solatis" created="Fri, 22 Apr 2011 20:47:11 +0000"  >&lt;p&gt;Yeah I&apos;m using connection pooling, and there are very little extra messages. But, for example, when running our automated tests, we constantly see these log messages because lots of connections get created / dropped, making the real output unreadable.&lt;/p&gt;

&lt;p&gt;In the end it&apos;s not a major issue, it&apos;s an inconvenience; however, I do think it&apos;s inappropriate for a database driver to show this behaviour (by default).&lt;/p&gt;</comment>
                            <comment id="29524" author="eliot" created="Fri, 22 Apr 2011 20:42:55 +0000"  >&lt;p&gt;Are you using connection pooling?&lt;br/&gt;
If you do, should have very little extra messages.&lt;/p&gt;</comment>
                            <comment id="29523" author="solatis" created="Fri, 22 Apr 2011 20:40:58 +0000"  >&lt;p&gt;I&apos;m seeing it every time a new connection is established indeed. &lt;/p&gt;

&lt;p&gt;Making it configurable would be a good idea, but I generally think that it&apos;s kind of weird for a database driver to pollute the stdout.&lt;/p&gt;</comment>
                            <comment id="29521" author="eliot" created="Fri, 22 Apr 2011 20:24:12 +0000"  >&lt;p&gt;not really misconfiguration, its how we want it for our use cases.&lt;br/&gt;
we can make it configurable.&lt;br/&gt;
you should only be seeing it once per startup, are you seeing it more?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|hribhz:</customfieldvalue>

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