42. Consider the following set of commands in the mongo shell: use admin db.setLogLevel(5, "index") Which of the following statements is true after the logging level is changed by the above command? Choose the best answer:
题目选项
- A.Only indexes created in the admin database will be logged
- B.Debug messages will be indexed in the log file
- C.Queries taking over 5 milliseconds will be logged with the index the used
- D.Index management commands will be logged with debug severity
- E.Queries that require index access will be logged
答案置信度:高
正确答案:D
解析语言:中文
db.setLogLevel(5, "index") 是把 index 这个日志组件的详细度调到 5(debug),因此与索引相关的管理/操作会以 debug 级别写进日志(D)。它按组件生效而不是按数据库生效(A 错),不是给日志建索引(B 错),也与 5 毫秒的慢查询阈值无关(C 错)。