Skip to main content

Log Management

Log Management provides a unified entry point for viewing runtime logs of resources in a CloudBase environment. You can filter logs by resource type, time range, and log type, and use the search syntax to quickly locate issues.

Access​

  1. Sign in to the CloudBase platform and select the target environment.
  2. Select Log Monitoring in the left navigation pane.
  3. Select the Log Management tab at the top of the page.

Filters​

The following filters are available at the top of the page:

FilterDescription
Resource TypeSelect the resource to view, such as cloud functions, databases, or HTTP gateway
Time RangePreset ranges such as the last 3 days or last 7 days, or a custom time range
Log TypeReal-time logs / historical logs
Search ConditionClick "Add search condition" for fine-grained filtering

Log List​

Logs are listed in reverse chronological order. Taking cloud function logs as an example, the list contains the following fields:

FieldDescription
No.Log sequence number
Log TimeWhen the log was generated; sortable
Log ContentDetailed log information, for example START RequestId: xxx
Invocation StatusCurrent invocation status
Function NameName of the cloud function that generated the log
Request IDUnique identifier of the request
Function VersionFunction version number, for example $LATEST

The column settings and search controls in the upper-right corner let you adjust the displayed fields.

Searching Logs​

Log Management supports three search methods:

MethodSyntaxUse Case
Full-text searchEnter a keyword directlyQuickly locate logs containing a keyword
Key-value searchkey:valuePrecisely match structured fields
Fuzzy searchabc*, ab?cMatch when the keyword is incomplete

Syntax notes:

  • Use a=b for an exact match.
  • Use a:b for a contains match, which supports fuzzy search.
  • Search is case-sensitive by default. To match ERROR, enter the keyword in uppercase.

For the full search syntax, tokenization rules, and examples, see Log Search.

Log Settings​

To disable log recording:

  1. Sign in to the CloudBase console and select the target environment.
  2. Open Log Management > Log Settings in the left navigation pane.
  3. Select Delete logs and confirm.
Note

After log recording is disabled, no new logs are generated. Existing historical logs remain searchable.

More Flexible Usage​

The console is suitable for interactive viewing. For batch queries, scripting, or AI-based analysis, use the CloudBase CLI log search command:

# Search all logs from the last hour
tcb logs search -e <env-id>

# Filter by function name for the last 6 hours
tcb logs search -q 'function_name:"myFunc"' -t 6h -e <env-id>

For the full syntax and field reference, see CLI Log Search.

CapabilityDescriptionDocumentation
Long-term log storageDeliver logs to Tencent Cloud Log Service (CLS); logs can also be delivered back to CloudBaseDeliver Logs to CLS
Resource metricsView invocation volume, latency distribution, and storage usageOperations Monitoring
Automatic alertingConfigure alert policies based on monitoring metricsMetric Alerts

Notes​

  • After the log content is split by token delimiters, a single token cannot exceed 32KB.
  • Monitoring and alerting rely on log and metric data, which is reported with some delay. Analyze data with an appropriate time window.