Log Search

Follow the directions below to search logs by keyword and time range:

  1. On the LTS console, click Log Management.
  2. In the log group list, click the name of a log group.
  3. In the log stream list, click the name of a log stream.

    Alternatively, click Search in the Operation column of the row containing the target log stream.

  4. In the upper right corner, select a time range.
  5. On the displayed page, enter a keyword in the search box.
  6. Click to start searching.

    Logs that contain the keyword are displayed.

Search Syntax and Examples

Search syntax:

Table 1 Search syntax

Filter

Description

Exact search by keyword

LTS searches for logs containing the exact keyword (case-sensitive) that you specify. A keyword is the word between two adjacent delimiters.

You can add an asterisk (*) after a keyword, for example, error*, if you are not familiar with delimiters.

Exact search by phrase

LTS searches for logs containing the exact phrase (case-sensitive) that you specify.

&&

Intersection of search results.

||

Union of search results.

AND

Intersection of search results.

NOT

Logs that contain the keyword after NOT are excluded.

*

Fuzzy search. The asterisk (*) can only be after a keyword to replace an unspecified number of characters.

?

Fuzzy search. The question mark (?) can be put in the middle or at the end of a keyword to replace a character.

Operators (such as &&, ||, AND, NOT, *, ?, and :) contained in raw logs cannot be used to search for logs.

Search rules:

Search examples:

  • Keywords are case-sensitive.
  • The asterisk (*) and question mark (?) do not match special characters such as hyphens (-) and spaces.