Gateway server-side logs

更新时间:
复制 MD 格式

The mPaaS gateway generates seven types of server-side logs. Each log covers a different aspect of gateway activity, from per-request summaries and full payloads to thread pool state and configuration changes.

Important

Only Private Cloud users can view server-side logs.

The gateway generates seven types of server-side logs. Each log file records a different aspect of gateway activity:

Log type

Log file

Purpose

API summary log

gateway-page-digest.log

One entry per API call — use for request tracing and success/failure auditing

API detail log

gateway-page-detail.log

Full request and response payloads — use for debugging individual calls

API statistics log

gateway-page-stat-s.log

Aggregated per-operation metrics — use for throughput monitoring

Gateway thread statistics log

gateway-threadpool.log

Thread pool state — use for capacity and performance analysis

Gateway configuration log

gateway-config.log

Configuration change events

Gateway default log

gateway-default.log

Instrumentation points with no designated log target

Gateway error log

gateway-error.log

Errors and exception stack traces

Use the TraceId field to correlate entries across the summary, detail, statistics, and error logs for the same request.

API summary log

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

The summary log records one entry per API call. Each entry contains the following fields:

  • Log timestamp

  • Request address

  • Response

  • Result: Y (success) or N (failure)

  • Time consumed, in milliseconds (ms)

  • operationType

  • System name

  • appId

  • workspaceId

  • Result code

  • Client product ID

  • Client product version

  • Channel

  • User ID

  • Device ID

  • UUID

  • Client track ID

  • Client IP address

  • Network protocol: HTTP or HTTP/2

  • Data protocol: JSON or PB (Protocol Buffers)

  • Request data size, in bytes

  • Response data size, in bytes

  • Stress testing flag

  • TraceId: the unique identifier for the request. Use this ID to find the corresponding entries in the detail, statistics, and error logs.

  • Component flag

  • Client system type

  • Backend system time consumed, in milliseconds (ms)

  • Client IP address type: 4 (IPv4) or 6 (IPv6)

  • RPC protocol version: 1.0 or 2.0

Format:

Timestamp - (Request address,Response,Result (Y/N),Time consumed,operationType,System name,appId,workspaceId,Result code,Client product ID,Client product version,Channel,User ID,Device ID,UUID,Client track ID,Client IP address,Network protocol,Data protocol,Request data size,Response data size,Is stress test,TraceId,Is component API,Client system type,Backend system time consumed,IP protocol version,RPC protocol version)

Example:

2020-06-03 14:14:08,001 - (/mgw.htm,response,Y,61 ms,alipay.mcdp.space.initSpaceInfo,-,84EFA9A281942,default,1000,-,-,-,-,Wz4Zak5peDgDAGRNW5rFFGhT,Wz4Zak5peDgDAGRNW5rFFGhTN9uqCLa,Wz4Zak5peDgDAGRNW5rFFGhTN9uqCLa,223.104.XXX.XXX,HTTP,JSON,2,2406,F,0a1d76671591164847940829820658,T,ANDROID,61,4,2.0)

API detail log

Log path: ~/logs/gateway/gateway-page-detail.log

The detail log captures full request and response data for each API call. Use it to inspect payloads when debugging individual requests. Detail logs are divided into two categories:

  • Request log: [request]

  • Response log: [response]

Request log

  • Log timestamp

  • Client IP address

  • TraceId

  • Log level

  • Log type: request

  • operationType

  • appId

  • workspaceId

  • requestData

  • sessionId

  • did: Device ID

  • contentType

  • mmtp: T or F. Indicates whether the MMTP (Mobile Message Transfer Protocol) protocol is used.

  • async: T or F. Indicates whether the invocation is asynchronous.

Response log

  • Log timestamp

  • Client IP address

  • TraceId

  • Log level

  • Log type: response

  • operationType

  • appId

  • workspaceId

  • responseData

  • resultStatus: Result code

  • contentType

  • sessionId

  • did: Device ID

  • mmtp: T or F. Indicates whether the MMTP protocol is used.

  • async: T or F. Indicates whether the invocation is asynchronous.

Example:

2017-12-21 15:37:10,208 [100.97.90.113][79c731d51513841830208829314258] INFO  - [request]operationType=com.alipay.gateway.test,appId=2A9ADA1045,workspaceId=antcloud,requestData=***,sessionId=-,did=WjtkmWe1uHsDADl7BEleyK2L,contentType=JSON,mmtp=F,async=T

2017-12-21 15:37:10,229 [][79c731d51513841830208829314258] INFO  - [response]operationType=com.alipay.gateway.test,appId=2A9ADA1045,workspaceId=antcloud,responseData=***,resultStatus=1000,contentType=JSON,sessionId=-,did=WjtkmWe1uHsDADl7BEleyK2L,mmtp=F,async=T

API statistics log

Log path: ~/logs/gateway/gateway-page-stat-s.log

The statistics log records aggregated metrics per operation type, grouped by result code and stress-test flag. Use it to monitor throughput and latency trends across API operations. Each entry contains the following fields:

  • Log timestamp

  • operationType

  • appId

  • workspaceId

  • Result: Y (success) or N (failure)

  • Result code

  • Stress testing flag

  • Total requests

  • Total time consumed, in milliseconds (ms)

Format:

Timestamp - operationType,appId,workspaceId,Result (Y/N),Result code,Stress testing flag (T/F),Total requests,Total time consumed (ms)

Example:

2017-12-21 15:34:58,419 - com.alipay.gateway.test,2A9ADA1045,antcloud,Y,1000,F,1,3

Gateway thread statistics log

Log path: ~/logs/gateway/gateway-threadpool.log

The thread statistics log records the state of the gateway thread pool at each log interval. Use it to identify thread exhaustion or queue buildup. Each entry contains the following fields:

  • Log timestamp

  • Thread name

  • Active threads

  • Current pool size

  • Peak pool size (largest number of threads ever created)

  • Core threads

  • Maximum threads

  • Task queue capacity

  • Remaining queue capacity

Format:

Timestamp [Thread name,ActiveCount,PoolSize,LargestPoolSize,CorePoolSize,MaximumPoolSize,QueueSize,QueueRemainingCapacity]

Example:

2017-12-21 16:33:32,617 [gateway-executor,0,80,80,80,400,0,1000]

Gateway configuration log

Log path: ~/logs/gateway/gateway-config.log

The configuration log records each change made to the gateway configuration, including the time of change and the updated settings.

Gateway default log

Log path: ~/logs/gateway/gateway-default.log

The default log captures instrumentation points that have no designated log target. Gateway components that do not write to a specific log file write here instead.

Gateway error log

Log path: ~/logs/gateway/gateway-error.log

The error log records runtime errors and exception stack traces. Use it to diagnose gateway failures and unexpected behavior.