Application Development FAQs
Key Information
To facilitate quick fault locating, provide detailed key information when posting an issue in the community. You are advised to provide a demo that can reproduce the fault.
The following uses ServiceComb Java chassis as an example:
- Framework logs: By default, framework logs are printed with service logs, and the cse.log file is generated in the root directory. If the log framework such as Log4j2 or Logback is used on the service side, search for the key information based on the customized log policy.
- Key information about service startup:
Table 1 Key information about service startup Keyword
Description
choose org.apache.servicecomb
ServiceComb Java chassis supports two types of REST communication channels. You need to determine the communication channel to be used based on logs.
The choose org.apache.servicecomb.transport.rest.vertx.VertxRestTransport framework uses the REST over Vertx communication channel by default. That is, Vertx is used as the HTTP server.
The choose org.apache.servicecomb.transport.rest.servlet.ServletRestTransport framework also supports the REST over Servlet communication channel. That is, other HTTP servers, such as Tomcat, are used.
endpoint to publish
Microservice release address.
Register microservice instance success
Flag indicating a successful service instance registration.
- Key information about service calling:
Table 2 Key information about service calling Keyword
Description
find instances
Before calling the server (called service), the consumer (calling service) queries the server instance from the service center of the microservice engine.
accesslog
The access.log file records the request sources, such as APIs and status codes for calling the service. By default, this function is disabled.
The access.log file printing is affected by the communication channel and log framework. If the REST over Vertx communication channel is used, the access.log file is recorded by Vertx.
The recommended format of the access.log file is as follows:
servicecomb.accesslog.pattern: "%h - - %t cs-uri %s %B %D %H %SCB-traceId"
By default, the access.log file is generated in the root directory. If the log framework such as Log4j2 or Logback is used on the service side, you can switch the log framework.
If the REST over Servlet communication channel is used, the access.log file is recorded by the HTTP server. To use the access.log file, find the related reference.
For example, enable the built-in Tomcat of Spring Boot as follows:
server: tomcat: accesslog: enabled: true pattern: '%h %l %u %t "%r" %s %b %D' directory: accesslogs buffered: false basedir: ./logs
- Key information about service startup:
- Versions of the microservice engine and SDK. You can click the engine name to view the microservice engine version. For the SDK version, search for the dependency whose groupId is org.apache.serivcecomb.
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.
For any further questions, feel free to contact us through the chatbot.
Chatbot