[SERVER-22745] refine "command" log component into subsets reflecting previously useful query component Created: 18/Feb/16  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Diagnostics, Querying
Affects Version/s: 3.2.0
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Asya Kamsky Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-21776 Move per-operation log lines for quer... Closed
Assigned Teams:
Query Execution
Participants:

 Description   

Log components were quite useful for various debugging/logging but some of them have become useless - query being one when find became a command.

Now increasing logLevel of "query" seems to have no effect, and there is no way to get higher query related debugging/logging without turning on all commands which defeats the purpose of the split.

Either db.setLogComponent(X, "query") should now apply to commands which took place of previously useful query component, or another way to increasing logging for it should be exposed.



 Comments   
Comment by J Rassi [ 19/Feb/16 ]

That really overloads COMMAND log component... I really would like to be able to see every query running on my mongod without needing to see every isMaster command ... any way to achieve that now?

There's already a log level 2 message that prints every incoming query in find.cpp (for OP_QUERY legacy queries). I hadn't realized until now that there's no such message in find_cmd.cpp, though; I suggest we add one.

As an alternative, we can delete this existing log level 2 message and instead add a log level 2 message for legacy query and find command that prints the query and some basic stats after finishing execution.

Comment by David Storch [ 19/Feb/16 ]

Not out of the box. You would enable commands logLevel 1 and then filter out the find command + query log lines. In my mind, logLevel 1 for a particular module should be safe for users to enable without resulting in an enormous amount of log data. Perhaps we could look at what it would take to make QUERY component logLevel 2 to turn on just "one log line per query" mode and nothing else?

Comment by Asya Kamsky [ 19/Feb/16 ]

That really overloads COMMAND log component... I really would like to be able to see every query running on my mongod without needing to see every isMaster command ... any way to achieve that now?

Comment by David Storch [ 18/Feb/16 ]

asya, we purposefully moved per-operation log lines out of the "query" component in order to make enabling query logLevel 1 feasible in the field. Now OP_QUERY find and find command will all be logged in the COMMAND log component. See SERVER-21776. This allows us to look specifically for rare but important query system events at logLevel 1, such as replans and cache flushes.

Generated at Thu Feb 08 04:01:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.