<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:38:38 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>[SERVER-35035] Additional levels of command debugging</title>
                <link>https://jira.mongodb.org/browse/SERVER-35035</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Even at level &quot;1&quot; of debugging, which is the lowest enabled debug level, the logs are pretty detailed:&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;2018-05-16T18:05:34.876-0700 I COMMAND [conn2] command test.user appName: &quot;MongoDB Shell&quot; command: find { find: &quot;user&quot;, filter: { email: &quot;test@aol.com&quot; }, $db: &quot;test&quot; } planSummary: EOF keysExamined:0 docsExamined:0 cursorExhausted:1 numYields:0 nreturned:0 reslen:82 locks:{ Global: { acquireCount: { r: 2 } }, Database: { acquireCount:{ r: 1 } }, Collection: { acquireCount: { r: 1 } } } protocol:op_msg 0ms&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;It would be helpful to add another level which is perhaps a bit less detailed so that we don&apos;t fill our logs so quickly trying to debug what commands are being sent to our server:&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;2018-05-16T18:05:34.876-0700 I COMMAND [conn2] command test.user command: find&#160;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment></environment>
        <key id="545197">SERVER-35035</key>
            <summary>Additional levels of command debugging</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-security">Backlog - Security Team</assignee>
                                    <reporter username="chengas123">Ben McCann</reporter>
                        <labels>
                            <label>log-verbosity</label>
                            <label>logging</label>
                            <label>move-sec</label>
                    </labels>
                <created>Thu, 17 May 2018 01:15:34 +0000</created>
                <updated>Mon, 8 Jan 2024 15:22:54 +0000</updated>
                                                                            <component>Logging</component>
                                        <votes>0</votes>
                                    <watches>14</watches>
                                                                                                                <comments>
                            <comment id="4552435" author="JIRAUSER1268880" created="Tue, 17 May 2022 11:21:57 +0000"  >&lt;p&gt;it&apos;s totally unusable in production!&lt;/p&gt;

&lt;p&gt;why is not possible to turn off all connection?&#160;&lt;/p&gt;

&lt;p&gt;the only thing is to turn off all connection attepmpt nothing else. is it possible?&lt;/p&gt;</comment>
                            <comment id="4260162" author="JIRAUSER1264070" created="Mon, 20 Dec 2021 18:27:40 +0000"  >&lt;p&gt;Every logging system allows to select a logging level from fatal error, errors, warning, info to debug and trace. Mongo has only debug (0) to trace (0). My unused node generates over 500 MB logs each day and I cannot stop it:&lt;/p&gt;

&lt;p&gt;{{{&quot;t&quot;:&lt;/p&gt;
{&quot;$date&quot;:&quot;2021-12-20T10:07:56.666+01:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:51800, &quot;ctx&quot;:&quot;conn6237&quot;,&quot;msg&quot;:&quot;client metadata&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.0.0.3:57168&quot;,&quot;client&quot;:&quot;conn6237&quot;,&quot;doc&quot;:{&quot;driver&quot;:{&quot;name&quot;:&quot;nodej {&quot;t&quot;:&lt;/p&gt;
{&quot;$date&quot;:&quot;2021-12-20T10:07:56.865+01:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:22944, &quot;ctx&quot;:&quot;conn6235&quot;,&quot;msg&quot;:&quot;Connection ended&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.0.0.3:57044&quot;,&quot;connectionId&quot;:6235,&quot;connectionCount&quot;:9}} {&quot;t&quot;:&lt;/p&gt;
{&quot;$date&quot;:&quot;2021-12-20T10:07:56.866+01:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:22944, &quot;ctx&quot;:&quot;conn6234&quot;,&quot;msg&quot;:&quot;Connection ended&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.0.0.3:57042&quot;,&quot;connectionId&quot;:6234,&quot;connectionCount&quot;:8}} {&quot;t&quot;:&lt;/p&gt;
{&quot;$date&quot;:&quot;2021-12-20T10:07:56.867+01:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:22944, &quot;ctx&quot;:&quot;conn6236&quot;,&quot;msg&quot;:&quot;Connection ended&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.0.0.3:57046&quot;,&quot;connectionId&quot;:6236,&quot;connectionCount&quot;:7}} {&quot;t&quot;:&lt;/p&gt;
{&quot;$date&quot;:&quot;2021-12-20T10:07:56.868+01:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:22943, &quot;ctx&quot;:&quot;listener&quot;,&quot;msg&quot;:&quot;Connection accepted&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.0.0.3:57254&quot;,&quot;connectionId&quot;:6238,&quot;connectionCount&quot;:8}} {&quot;t&quot;:&lt;/p&gt;
{&quot;$date&quot;:&quot;2021-12-20T10:07:56.868+01:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:22943, &quot;ctx&quot;:&quot;listener&quot;,&quot;msg&quot;:&quot;Connection accepted&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.0.0.3:57256&quot;,&quot;connectionId&quot;:6239,&quot;connectionCount&quot;:9}} }}&lt;/p&gt;

&lt;p&gt;{{ &quot;network&quot; : {&lt;br/&gt;
 &quot;verbosity&quot; : 0,&lt;br/&gt;
 &quot;asio&quot; : &lt;/p&gt;
{
 &quot;verbosity&quot; : -1
 }
&lt;p&gt;,&lt;br/&gt;
 &quot;bridge&quot; : &lt;/p&gt;
{
 &quot;verbosity&quot; : -1
 }
&lt;p&gt;,&lt;br/&gt;
 &quot;connectionPool&quot; : &lt;/p&gt;
{
 &quot;verbosity&quot; : -1
 }
&lt;p&gt; },}}&lt;/p&gt;

&lt;p&gt;Recommandation of quite mode is silly because Mongo official documentation does not recommend it for production deployments.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="1897268" author="ramon.fernandez" created="Mon, 21 May 2018 17:18:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=chengas123&quot; class=&quot;user-hover&quot; rel=&quot;chengas123&quot;&gt;chengas123&lt;/a&gt;, I&apos;m sending this request to one of our Product managers for evaluation.&lt;/p&gt;</comment>
                            <comment id="1896155" author="chengas123" created="Fri, 18 May 2018 23:57:43 +0000"  >&lt;p&gt;Yes, I&apos;d like to log different messages, not fewer. Sorry if that wasn&apos;t clear&lt;/p&gt;

&lt;p&gt;E.g. on log level 1 we could have:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;the timestamp&lt;/li&gt;
	&lt;li&gt;the connection name&lt;/li&gt;
	&lt;li&gt;the user&lt;/li&gt;
	&lt;li&gt;the namespace&lt;/li&gt;
	&lt;li&gt;the command name&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;And on log level 2 we could have:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;the timestamp when the command finished&lt;/li&gt;
	&lt;li&gt;the connection name&lt;/li&gt;
	&lt;li&gt;the user&lt;/li&gt;
	&lt;li&gt;the namespace&lt;/li&gt;
	&lt;li&gt;the command name&lt;/li&gt;
	&lt;li&gt;the app name&lt;/li&gt;
	&lt;li&gt;the query parameters&lt;/li&gt;
	&lt;li&gt;the planSummary&lt;/li&gt;
	&lt;li&gt;num docsExamined&lt;/li&gt;
	&lt;li&gt;cursorExhausted&lt;/li&gt;
	&lt;li&gt;numYields&lt;/li&gt;
	&lt;li&gt;nreturned&lt;/li&gt;
	&lt;li&gt;reslen&lt;/li&gt;
	&lt;li&gt;locks&lt;/li&gt;
	&lt;li&gt;protocol&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;One big reason I&apos;m asking for this is that my internal corporate security team / SREs won&apos;t let me turn on debug logging because it logs PII by logging the command arguments / query parameters. If there were a lesser level of debug logging that I could use to track what&apos;s happening without them worrying about me collecting PII then that would be really helpful&lt;/p&gt;</comment>
                            <comment id="1895883" author="milkie" created="Fri, 18 May 2018 20:34:41 +0000"  >&lt;p&gt;I see in your original description, you want a log line that shows the following four items of information:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;the timestamp when the command finished&lt;/li&gt;
	&lt;li&gt;the connection name&lt;/li&gt;
	&lt;li&gt;the namespace&lt;/li&gt;
	&lt;li&gt;the command name&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;But no other information.  If that is what you specifically want, we can consider that.&lt;/p&gt;</comment>
                            <comment id="1895877" author="milkie" created="Fri, 18 May 2018 20:30:50 +0000"  >&lt;p&gt;I don&apos;t understand why you can set the debug log level but not the debug log component.  Certainly if you chose log level &quot;1&quot; and component &quot;COMMAND&quot; you would receive less detail (fewer log messages) than what you currently receive by choosing level &quot;1&quot; but not choosing a component.  &lt;br/&gt;
I&apos;m not sure how that is different from what you are asking for; can you give an example?  Do you want different log messages, instead of fewer?&lt;/p&gt;</comment>
                            <comment id="1895841" author="chengas123" created="Fri, 18 May 2018 20:09:19 +0000"  >&lt;p&gt;I doubt our SRE team would let us turn off SSL unfortunately, but it is a creative option that I appreciate considering!&lt;/p&gt;

&lt;p&gt;I don&apos;t think there&apos;s anything I can do on my side regarding configuring log levels or components because what I meant was that it seems like whether I set level &quot;1&quot; or &quot;5&quot; even at level &quot;1&quot; the logging is quite detailed already. It would be nice if what&apos;s being logged at level &quot;1&quot; currently was moved to &quot;2&quot; and there was some higher-level information logged for &quot;1&quot;&lt;/p&gt;</comment>
                            <comment id="1893759" author="milkie" created="Thu, 17 May 2018 13:18:03 +0000"  >&lt;p&gt;There is also a server parameter that can help you fine-tune logging verbosity:&lt;br/&gt;
&lt;a href=&quot;https://docs.mongodb.com/manual/reference/parameters/#param.logComponentVerbosity&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/parameters/#param.logComponentVerbosity&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;m not sure what your exact use case is, but if you just want to see log lines with the COMMAND component at level &quot;1&quot; and no other components, you can use that server parameter to achieve that.&lt;/p&gt;</comment>
                            <comment id="1893757" author="schwerin" created="Thu, 17 May 2018 13:17:40 +0000"  >&lt;p&gt;You can also set the log level for specific components, which might help here. &lt;/p&gt;</comment>
                            <comment id="1893749" author="dan@10gen.com" created="Thu, 17 May 2018 13:09:36 +0000"  >&lt;p&gt;Hi Ben.  It can be difficult to choose the right level at which to log for the debug logs.  If you&apos;re trying to monitor the cmds being sent to the server, you might be able to leverage the report functionality in &lt;a href=&quot;https://docs.mongodb.com/manual/reference/program/mongoreplay/#monitor&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongoreplay&lt;/a&gt;.  It won&apos;t work if you&apos;ve enabled SSL, but otherwise may be a good option.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="202412">SERVER-18339</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25129"><![CDATA[Server Security]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 17 May 2018 13:09:36 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 38 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 38 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-security</customfieldvalue>
            <customfieldvalue>chengas123</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>lfarkas@lfarkas.org</customfieldvalue>
            <customfieldvalue>leos@lelisoft.com</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hty9zb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htyzr3:</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>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htxw8n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>