Get peer pod log

Prev Next

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 /networks/{networkId}/peers/{peerId}/logs

Request headers

For headers common to all Blockchain Service APIs, see Common Blockchain Service headers.

Request path parameters

The following describes the parameters.

Field Type Required Description
networkId Long Required Network ID
peerId Long Required Peer ID

Request query parameters

The following describes the parameters.

Field Type Required Description
tailLines Integer Optional Number of lines in the log
  • 1000 - 99,000
  • 1000 (default)

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 response status codes common to all Blockchain Service APIs, see Common 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