tencent cloud

Error Log Query
Last updated: 2025-08-22 16:41:26
Error Log Query
Last updated: 2025-08-22 16:41:26
The TencentDB for MongoDB (MongoDB) console supports querying and managing error logs. Error logs record error information that occurs during database operations, including critical errors, general errors, and warnings. These logs assist with troubleshooting and system maintenance, helping users quickly locate and resolve runtime issues.

Use Instructions

Error logs are retained for 7 days, and each query can cover a time range of up to 7 days.

Querying Error Logs

2. In the left sidebar, expand the MongoDB dropdown list and select either Replica Set Instance or Shard Instance. The operations for replica set instances and sharded instances are similar.
3. Select a region at the top of the instance list page on the right.
4. Locate the target instance in the instance list.
5. Click the Target Instance ID to go to the Instance Details page.
6. Go to the Log Management tab and switch to the Error Log page to view the error logs of all instance requests in the current region.

7. At the top of the log list, you can filter the desired logs by instance ID, log generation time range, and other keywords.
In the Instance dropdown list, select the instance ID you want to query.
In the time box field, select the desired time period for the query.
In the keyword input box, you can filter the desired logs by entering one or more keywords, such as log category, log details, or connection information.
Log Parameter
Log Description
Log Type
The supported log categories include, but are not limited to, COMMAND, ACCESS, CONTROL, FTDC, INDEX, NETWORK, QUERY, REPL, SHARDING, STORAGE, RECOVERY, JOURNAL, and WRITE. The exact categories available may vary depending on the MongoDB version. For more details, see log messages.
Log Level
The log level indicates the severity of log messages, ranked from highest to lowest as follows: FATAL, ERROR, and WARNING.
FATAL: A critical error that typically causes the program or service to stop running.
ERROR: A serious error that does not immediately cause the program or service to stop running.
WARNING: A warning message indicating a potential issue or unexpected behavior that does not immediately affect the normal operation of the system.
Creation Time
The time when the error log was generated.
Log details
Describes the raw log content. The format of the log content may vary depending on the version.
For versions earlier than 4.4, the log format includes the following fields: Timestamp, Log Level, Component, Request Context, and Message.
The log levels are represented as follows: I for INFO (informational), W for WARNING, E for ERROR, F for FATAL (critical error), and D for DEBUG (debugging information).
2014-11-03T18:28:32.450-0500 I NETWORK [initandlisten] waiting for connections on port 27017
For version 4.4 and later versions, the log format includes the following fields: Timestamp (t), Log Level (s), Component (c), Error Code (id), Request Context (ctx), Message (msg), and Additional Information (attr).
{"t": {"$date": "2023-03-16T14:33:25.117-04:00"},"s": "I","c": "NETWORK","id": 23016,"ctx": "listener","msg": "Waiting for connections","attr": {"port": 27017,"ssl": "off"}}
Connection Information
Connection ID information extracted from the request context.
Log ID
Log ID information.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback