4

How can I enable RPC access debug log on my bitcoind. My application calls some commands to the bitcoind via RPC. I want to see all of RPC accesses with their parameters like command name and caller IP address as well if possible.

zono
  • 1,935
  • 1
  • 20
  • 35

2 Answers2

6

I found the way. I confirmed the logs are saved as I expected.

bitcoin.conf

debug=mempool
debug=rpc
zono
  • 1,935
  • 1
  • 20
  • 35
  • Another way to enable debug log: put '-debug=' as the command line parameter of bitcoind, can be coindb, db, mempool, rpc and so on. For example: bitcoind -debug=rpc – gary Dec 06 '17 at 05:33
1

The debugging from adding debug=rpc to bitcoind.conf is fairly terse:

2023-03-24T11:24:48Z ThreadRPCServer method=getblockchaininfo user=bitcoin
2023-03-24T11:25:02Z ThreadRPCServer method=getblockchaininfo user=bitcoin
2023-03-24T11:25:02Z ThreadRPCServer method=getrawmempool user=bitcoin
2023-03-24T11:25:02Z ThreadRPCServer method=getmempoolentry user=bitcoin
2023-03-24T11:25:02Z ThreadRPCServer method=getmempoolentry user=bitcoin
2023-03-24T11:25:02Z ThreadRPCServer method=getmempoolentry user=bitcoin
2023-03-24T11:25:02Z ThreadRPCServer method=getmempoolentry user=bitcoin
2023-03-24T11:25:02Z ThreadRPCServer method=getmempoolentry user=bitcoin
shuckc
  • 111
  • 2