Gateway SPI logs

更新时间:
复制 MD 格式

Gateway SPI logs are generated by business systems that integrate mpaasgw-spi-mpc or mpaasgw-spi-dubbo. Use these logs to monitor API requests, verify service registration, and diagnose errors.

The following table summarizes the five log files and their purposes.

Log file

Path

Purpose

API summary log

~/logs/mobileservice/page-digest.log

One-line summary of each API call: operation type, client, execution time, and result

SPI startup log

~/logs/mobileservice/boot.log

Records service registration and startup. Use this to verify that an operationType is registered successfully

API monitoring log

~/logs/mobileservice/monitor.log

Detailed per-request logs, including debug information and exception stack traces

SPI default log

~/logs/mobileservice/common-default.log

Catch-all log for instrumentation points that do not write to a specific log file

SPI error log

~/logs/mobileservice/common-error.log

Errors and exception stack traces

API summary log

Log path: ~/logs/mobileservice/page-digest.log

Each line summarizes a single API call and includes the following fields:

  • Log printing time

  • operationType

  • Client productId

  • Client productVersion

  • Execution time (in ms)

  • Result (Y/N)

  • Result code

  • uniqueId

Format:

Time - (operationType,productId,productVersion,Execution time,Result (Y/N),Result code,uniqueId)

Example:

2017-09-12 11:15:57,700 - (com.alipay.gateway.test,ANT_CLOUD_APP,3.0.0.20171214,36 ms,Y,1000,79c731d5150518615768657974443)

SPI startup log

Log path: ~/logs/mobileservice/boot.log

The startup log records the registration and startup status of the mobileservice business system. Registration goes through the following six stages in sequence:

  • Start-To-Register-Service: Starts parsing API service interfaces.

  • Start-To-Analyze-Method: Starts parsing methods in the API service interfaces.

  • Analyze-Method-Parameter: Parses method parameters.

  • Method-Info: Method information.

  • Registered-OperationType: A single API operationType is registered.

  • Register-Service-Success: All API operationTypes in this interface are registered.

To verify that an operationType is registered, check for a Register-Service-Success entry with the expected interface name.

Example:

2017-12-20 11:25:59,746 [Start-To-Register-Service] target: com.alibaba.mpaasgw.biz.shared.rpctest.MockRpcImpl@5b490d5e, interface: interface com.alibaba.mpaasgw.biz.shared.rpctest.MockRpc

2017-12-20 11:25:59,771 [Start-To-Analyze-Method] method=mock

2017-12-20 11:25:59,780 [Analyze-Method-Parameter] parameters=["s"]

2017-12-20 11:25:59,839 [Method-Info] MethodInfo[paramCount=1,paramType={class com.alibaba.mpaasgw.biz.shared.rpctest.MockRpc$Req},paramNames={s},returnType=class com.alibaba.mpaasgw.biz.shared.rpctest.MockRpc$Resp,target=com.alibaba.mpaasgw.biz.shared.rpctest.MockRpcImpl@5b490d5e,method=public abstract com.alibaba.mpaasgw.biz.shared.rpctest.MockRpc$Resp com.alibaba.mpaasgw.biz.shared.rpctest.MockRpc.mock(com.alibaba.mpaasgw.biz.shared.rpctest.MockRpc$Req),interfaceClass=interface com.alibaba.mpaasgw.biz.shared.rpctest.MockRpc] 

2017-12-20 11:25:59,839 [Registered-OperationType] operationType=com.alipay.sofa.mock 

2017-12-20 11:25:59,840 [Register-Service-Success] target=com.alibaba.mpaasgw.biz.shared.rpctest.MockRpcImpl@5b490d5e, interface=interface com.alibaba.mpaasgw.biz.shared.rpctest.MockRpc

API monitoring log

Log path: ~/logs/mobileservice/monitor.log

Logs detailed information for each API request, including debug output and exception stack traces.

SPI default log

Log path: ~/logs/mobileservice/common-default.log

Captures output from instrumentation points that do not target a specific log file.

SPI error log

Log path: ~/logs/mobileservice/common-error.log

Records errors and exception stack traces.