Help Center/
Cloud Service Engine/
Best Practices/
ServiceComb Engines/
ServiceComb Engine Application Hosting/
Hosting a Java Chassis Application/
Log Files Configuration
Updated on 2023-11-08 GMT+08:00
Log Files Configuration
Viewing error logs is an important method for locating faults. Therefore, you need to properly plan log output to minimize the impact on system performance. Suggestions for planning log files:
- Use log4j2 or logback to output logs. Output logs to a file without depending on stdout of the container.
- Open the metrics log, export this log to an independent file, for example, metrics.log, and export service logs to another file, for example, servicecomb.log. Configure metrics parameters as follows:
servicecomb: metrics: window_time: 60000 invocation: latencyDistribution: 0,1,10,100,1000 Consumer.invocation.slow: enabled: true msTime: 3000 Provider.invocation.slow: enabled: true msTime: 3000 publisher.defaultLog: enabled: true endpoints.client.detail.enabled: true
- Open access log and export it to an independent log file.
- The service log containing trace ID is printed in a formatted manner. You can develop a handler and configure it before Provider Handler. After receiving and processing a request, the handler prints logs respectively. This helps you locate faults and quickly search for related logs using AOM.
Parent topic: Hosting a Java Chassis Application
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot