If an exception occurs in your application, you can use logs to accurately identify the exception. The log analysis feature allows you to analyze logs that are collected by Log Service or Application Real-Time Monitoring Service (ARMS). This topic describes how to enable the log analysis feature and analyze logs that are collected by Log Service.
Prerequisites
- The data of your application is imported to ARMS Application Monitoring. For more information, see Overview.
- Log Service is activated. If Log Service is not activated, log on to the Log Service console and activate Log Service by following the on-screen instructions.
- A Log Service project is created. For more information, see Create a project.
- A Log Service Logstore is created. For more information, see Create a Logstore.
Log sources
The log analysis feature supports logs that are collected by Log Service or ARMS. This topic describes how to query and analyze logs that are collected by Log Service. For more information about how to analyze logs that are collected by ARMS, see Analyze logs collected by ARMS.
- Analyze logs collected by ARMS: You can use the ARMS agent to collect the output of
the log framework and push the collected logs to the log analysis center of ARMS.
After you enable the log analysis feature, you can query and analyze the logs of your
application in the ARMS console without the need to perform other operations.
Note If you analyze logs collected by ARMS, you must upgrade the ARMS agent to V2.7.1.4 or later.
- Analyze logs collected by Log Service:
You must make sure that the logs of your application are collected to Log Service. Then, you must specify the project and Logstore that store the logs on the Application Settings page of the ARMS console. To help you analyze logs, the console pages of Log Service are embedded in ARMS.