Available in VPC
Get the peer pod logs for a blockchain network.
Request
The following describes the request format for the endpoint. The request format is as follows:
| Method | URI |
|---|---|
| GET | /api/v1/networks/{networkId}/peers/{peerId}/logs (Korea Region) |
| GET | /api/sgn-v1/networks/{networkId}/peers/{peerId}/logs (Singapore Region) |
Request headers
For information about the headers common to all Blockchain Service APIs, see Blockchain Service request headers.
Request path parameters
You can use the following path parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
networkId |
Long | Required | Network ID
|
peerId |
Long | Required | Peer ID
|
Request query parameters
You can use the following query parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
tailLines |
Integer | Optional | Number of lines in the log
|
Request example
The following is a sample request.
curl --location --request GET 'https://blockchainservice.apigw.ntruss.com/api/v1/networks/{networkId}/peers/{peerId}/logs?tailLines=1000' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json'
Response
The following describes the response format.
Response body
The following describes the response body.
| Field | Type | Required | Description |
|---|---|---|---|
| log | Plain Text | - | Peer pod log |
Response status codes
For information about the HTTP status codes common to all Blockchain Service APIs, see Blockchain Service response status codes.
Response example
The following is a sample example.
>\033[0;35m peer node start \033[0m
[34m2024-07-30 06:35:41.354 UTC [nodeCmd] serve -> INFO 001[0m Starting peer:
Version: 2.2.3
Commit SHA: 94ace65
Go version: go1.15.7
OS/Arch: linux/amd64
Chaincode:
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
[34m2024-07-30 06:35:41.354 UTC [peer] getLocalAddress -> INFO 002[0m Auto-detected peer address: 198.18.1.14:443
[34m2024-07-30 06:35:41.354 UTC [peer] getLocalAddress -> INFO 003[0m Auto-detect flag is set, returning 198.18.1.14:443
[34m2024-07-30 06:35:41.374 UTC [nodeCmd] initGrpcSemaphores -> INFO 004[0m concurrency limit for endorser service is 2500
[34m2024-07-30 06:35:41.374 UTC [nodeCmd] initGrpcSemaphores -> INFO 005[0m concurrency limit for deliver service is 2500