[SERVER-5892] setParameter for "logLevel" logged incorrectly Created: 21/May/12  Updated: 16/Jun/15  Resolved: 22/May/12

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Tad Marshall Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Tested on Windows


Issue Links:
Related
is related to SERVER-18985 setParameter should log at level 0 Closed
Operating System: ALL
Participants:

 Description   

Looking at the mongod log after issuing a setParameter command setting logLevel to 2, the log reports that I did something different:
Shell:

> db.adminCommand({ setParameter : 1, logLevel : 2 })
{ "was" : 0, "ok" : 1 }
>

mongod log:

Mon May 21 19:46:27 [conn1] runQuery called admin.$cmd { replSetGetStatus: 1.0, forShell: 1.0 }
Mon May 21 19:46:27 [conn1] run command admin.$cmd { replSetGetStatus: 1.0, forShell: 1.0 }
Mon May 21 19:46:27 [conn1] command: { replSetGetStatus: 1.0, forShell: 1.0 }
Mon May 21 19:46:27 [conn1] command admin.$cmd command: { replSetGetStatus: 1.0, forShell: 1.0 } ntoreturn:1 keyUpdates:0 reslen:76 0ms



 Comments   
Comment by Tad Marshall [ 22/May/12 ]

Why was a single setting of logLevel to a new value not logged? I tested on 2.1.2-pre-.

Comment by Scott Hernandez (Inactive) [ 22/May/12 ]

I just did a quick test of setting to 2, then 0:

Mon May 21 20:53:30 [conn1] runQuery called admin.$cmd { replSetGetStatus: 1.0, forShell: 1.0 }
Mon May 21 20:53:30 [conn1] run command admin.$cmd { replSetGetStatus: 1.0, forShell: 1.0 }
Mon May 21 20:53:30 [conn1] command: { replSetGetStatus: 1.0, forShell: 1.0 }
Mon May 21 20:53:30 [conn1] command admin.$cmd command: { replSetGetStatus: 1.0, forShell: 1.0 } ntoreturn:1 keyUpdates:0 reslen:76 0ms
 
 
Mon May 21 20:53:36 [conn1] runQuery called admin.$cmd { setParameter: 1.0, logLevel: 0.0 }
Mon May 21 20:53:36 [conn1] run command admin.$cmd { setParameter: 1.0, logLevel: 0.0 }
Mon May 21 20:53:36 [conn1] command: { setParameter: 1.0, logLevel: 0.0 }
Mon May 21 20:53:36 [conn1] command admin.$cmd command: { setParameter: 1.0, logLevel: 0.0 } ntoreturn:1 keyUpdates:0 reslen:46 0ms

This looks fine.

Maybe you want setParameter to log at info (0) level all the time? That isn't a bad idea, but def. is a different issue.

Comment by Scott Hernandez (Inactive) [ 22/May/12 ]

These entries are normal from the shell when it does the prompt. What did you expect to see? It clearly increased logging cause now you see those

Generated at Thu Feb 08 03:10:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.