Help Center> ServiceStage> FAQs> Application Development FAQs
Updated on 2023-10-30 GMT+08:00

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:

  1. 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.
    1. 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.

    2. 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. For details, see https://servicecomb.apache.org/references/java-chassis/en_US/build-provider/access-log-configuration/.

      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 by referring to https://servicecomb.apache.org/references/java-chassis/en_US/build-provider/access-log-configuration/.

      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
  2. 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.