Viewing Context of a Log
Viewing the context of a log is to find the preceding or following logs of the log in raw logs. This helps you quickly locate fault information by searching for logs generated before and after the specified log generation time to troubleshoot service faults.
Advantages
- You can quickly view the context of any log on the Log Search tab page of the LTS console without logging in to the host.
- On the Log Search tab page of the LTS console, you can quickly locate a fault by searching for suspicious logs in a specified time range and then query the context of the logs.
Viewing Context of a Log
- Log in to the LTS console and choose Log Management in the navigation pane.
- Click the target log group or stream to access the log details page.
- Click Raw Logs on the Log Search tab page and click
.
- On the displayed Context Logs page, check the log context. For details, see Table 1.
Table 1 Viewing context logs 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.