Updated on 2025-02-12 GMT+08:00

Saving Conditions for Quick Search

If you need to repeatedly use a keyword to search for logs, you can set and save the keyword as a quick query statement for faster log querying and analysis.

Saving Conditions for Quick Search

  1. Log in to the management console and choose Management & Deployment > Log Tank Service. The Log Management page is displayed by default.
  2. Click the target log group or stream. The log stream details page is displayed.
  3. Click on the Log Search tab page. Enter a name and statement for quick search. By default, quick search and quick search (local cache) are enabled.

    • A quick search name is used to distinguish multiple quick search statements. The name can be customized and must meet the following requirements:
      • Can contain only letters, digits, hyphens (-), underscores (_), and periods (.).
      • Cannot start with a period (.) or underscore (_) or end with a period (.).
      • Can contain 1 to 64 characters.
    • A quick search statement is used to repeatedly search for logs, for example, error*.

  4. Click OK. On the Quick Search tab page in the left navigation pane, you can view the statements that are successfully saved.

    Click the name of a quick search statement to view log details.

Viewing Context of a Log

You can check the logs generated before and after a log for quick fault locating.

  1. On the Log Search tab page of the log details page, click to view the context.

    Details of several logs generated before and after the log are displayed.

  2. On the displayed page, check the log context. For details, see Table 1.

    Table 1 Introduction to log context viewing

    Feature

    Description

    Search Rows

    Select the number of lines of logs to be queried as required.

    Highlighting

    Enter a string to be highlighted and press Enter.

    Filter

    Enter a string to be filtered and press Enter. When both Highlighting and Filter are configured, the filtered string can also be highlighted.

    Fields

    The default field for viewing log context is content. Click Fields to view the context of other fields.

    Prev

    View half the number of Search Rows leading to the current position. For example, if Search Rows is set to 100 and you click Prev, 50 rows prior to the current position are displayed. In this case, the current line number is -50. If you click Prev again, the line number will become -100, -150, -200, and so on.

    Current

    Current log position. When Prev or Update is set, you can click Current to return to the position where the context starts (when the line number is 0).

    Update

    View half the number of Search Rows following the current position. For example, if Search Rows is set to 100 and you click Update, 50 rows following the current position are displayed. In this case, the current line number is 50. If you click Update again, the line number will become 100, 150, 200, and so on.

    Summary Mode

    • If this mode is enabled, only the line number and content are displayed.
    • If this mode is disabled, log details are displayed.

    Download

    Only content in the content field can be downloaded to the local PC.