Updated on 2023-12-21 GMT+08:00

Viewing Real-Time Logs

You can view reported logs on the LTS console in real time.

Prerequisites

  • You have created log groups and log streams.
  • You have installed ICAgent.
  • You have configured log collection rules.

Procedure

  1. On the LTS console, click Log Management.
  2. In the log group list, click on the left of a log group name.
  3. In the log stream list, click the name of the target log stream.
  4. Click the Real-Time Logs tab to view the real-time logs.

    Filter host and K8s logs by source.

    • If Source is set to Host, set the host IP address and file path.
    • If Source is set to K8s, set the instance name, container name, and file path.
    • Filter: Obtain data from the index configuration, structuring configuration, and latest logs.

Logs are reported to LTS once every minute. You may wait for at most 1 minute before the logs are displayed.

In addition, you can customize log display by clicking Clear or Pause in the upper right corner.
  • Clear: Displayed logs will be cleared from the real-time view.
  • Pause: Loading of new logs to the real-time view will be paused.

    After you click Pause, the button changes to Continue. You can click Continue to resume the log loading to the real-time view.

    Figure 1 Viewing logs in real time

Stay on the Real-Time Logs tab to keep updating them in real time. If you leave the Real-Time Logs tab page, logs will stop being loaded in real time. The next time you access the tab, the logs that were shown before you left the tab will not be displayed.