Important logs
You can view logs to quickly check the running status of a single machine and troubleshoot issues. This topic describes the important logs that AHAS provides. These logs apply to all applications that use AHAS application protection.
| File | Path | Description |
| Second-level monitoring log | ${user_home}/logs/csp/${app_name}-${pid}-metrics.log | All resources generate second-level logs. Use these logs to view the running status of resources. |
| Block details log | ${user_home}/logs/csp/sentinel-block.log | When a rule takes effect and blocks a request, a corresponding log is generated. |
| Business log | ${user_home}/logs/csp/sentinel-record.log.${date} | Records the push, receipt, and processing of rules, and the status of resource calls. This information is very helpful for troubleshooting. |
| Reporting log | ${user_home}/logs/csp/command-center.log.${date} | Records communication between the application and the Dashboard. Use these records to troubleshoot communication issues with the Dashboard. |
When you use the SDK, a status.log file is generated, as shown in the following figure.

Second-level monitoring log
All resources generate second-level logs. These logs are stored in ${user_home}/logs/csp/${app_name}-${pid}-metrics.log. The format is as follows:
1532415661000|2018-07-24 15:01:01|sayHello(java.lang.String)|12|3|4|2|295|101532415661000: The timestamp.2018-07-24 15:01:01: The formatted timestamp.sayHello(java.lang.String): The resource name.12: The number of incoming requests that passed the Sentinel rule check (passed QPS).3: The number of requests that were blocked for the resource (blocked QPS).4: The number of calls to the resource that completed per second (completed calls), including both normal and abnormal completions (exit QPS).2: The number of exceptions.295: The average response time (RT) of the resource.10: The concurrency.
Block details log
The second-level block details logs for traffic limiting, degradation, and system protection are recorded in the ${user_home}/logs/csp/sentinel-block.log file. The format is as follows:
2014-06-20 16:35:10|1|sayHello(java.lang.String,long),FlowException,default,origin|61,0
2014-06-20 16:35:11|1|sayHello(java.lang.String,long),FlowException,default,origin|1,02014-06-20 16:35:10: The timestamp.1: The ordinal number.sayHello(java.lang.String,long): The resource descriptor.XXXException: The type of block. For example,FlowExceptionindicates traffic limiting,DegradeExceptionindicates degradation, andSystemExceptionindicates system protection.default: The limiting application configured in the rule.origin: The source application that was blocked. This can be an empty string.61,0: The first value (61) indicates the number of times traffic limiting or degradation occurred in the current second. The second value (0) has no meaning and can be ignored.
Business log
The business log is located in ${user_home}/logs/csp/sentinel-record.log.${date}. It contains records of rule operations, such as pushing, receiving, and processing rules.
Reporting log
All communication with the Dashboard is recorded in the ${user_home}/logs/csp/command-center.log.${date} log. You can use this log to troubleshoot issues, such as verifying a successful connection from the Dashboard to the machine.