You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Query log
Query the context of specified log
Copy page
Download PDF
Query the context of specified log
TLS supports viewing the contextual information of specified logs in the source file during log queries.​
Limits​
  • Context queries are only supported for logs collected by LogCollector 1.0.6 or later version. Log data uploaded via other methods, such as the PutLogs API through SDK, does not support context queries. For details, see Single-line full text mode, Write logs using the Go SDK.​
Background information​
When using the TLS query feature to search logs, it is often necessary to view the contextual information of a specific log entry from a designated server or file. For example, in scenarios such as access failures or exception events, it is essential to examine the log information related to the failure or exception, including several log entries before or after the exception log, based on the timeline of the event.​
TLS provides a context query feature that allows you to quickly locate exception logs in the console and visually display their contextual information from the specified server and log source file. The context query feature is ideal for quickly pinpointing exceptions and faults, enabling operations personnel to review surrounding information related to the issue, thereby assisting in troubleshooting and problem identification.​
Steps​
  1. Select the region where torch log service is located from the top navigation bar.​
  1. In the left navigation pane, select Common functions > Query and analysis.​
  1. On Query and analysis page, a list is displayed in the left area. Select the specified project and topic.​
  1. On the query and analysis page for the specified log topic, enter the query statement and set the time range.​
  1. On the Raw Logs tab, locate the specified log and click the search icon.​
  • ​Image​​
  1. Scroll up or down to view the contextual information of the specified log.​
  • You can view more information in the following ways:​
  • View context in raw logs or table format.​
  • By default, the page displays log data in raw log format and positions to the specified log with a serial number of 0. Scroll up to view logs collected before the specified log, with serial numbers as decreasing negative values indicating the number of logs prior to the specified log. Scroll down to view logs collected after the specified log, with serial numbers as increasing positive values indicating the number of logs following the specified log.​
  • View log data in raw log or table format.​
  • Use field configuration to view only specified log fields.​
  • Highlight specified log field values using the highlight feature. After setup, this string will appear highlighted in teal in the log content column.​
  • Filter logs in context by field values containing specified strings using filter conditions. After setup, this string will appear highlighted in yellow in the log content column.​
  • ​Image​​
  1. Download context query results.​
  1. Select Download > Download logs after the filter conditions.​
  1. Enter a task name, verify log details, configure the following parameters, and then click OK.​
  • ​
    Parameters​
    Description​
    Time range​
    Select the time range for downloading query logs.​
    Export format​
    Select the export format for downloading logs. Supported formats: CSV, JSON, JSONL.​
    Compression type​
    Select the compression type for downloading logs. Supported types: None, gzip, zip.​
    ​
Notice​
Files are automatically deleted after 1 day by default. Please download the relevant files promptly.​
  1. Select Download > Export history.​
  1. In the export history list, locate the target download task and click Download under Actions.​
​
Last updated: 2025.12.29 11:05:22