This guide explains Bitcoin Core debug logging in plain English. It focuses on what the subject is, why it matters and what a beginner should remember.
TL;DR
- What it is: Bitcoin Core writes general operational information to debug.log and can enable categories such as network, RPC, mempool, pruning, Tor and ZMQ. Detailed logs are invaluable during incidents, but they can reveal peer addresses, transaction timing, filesystem paths, wallet activity, RPC parameters and private topology.
- Why it matters: Bitcoin Core debug logs are powerful evidence and a potential privacy record. Narrow categories, strict permissions, bounded retention and sanitised support workflows preserve their diagnostic value without turning an incident into a data leak.
- Current position: Bitcoin Core writes general operational information to debug.log and can enable categories such as network, RPC, mempool, pruning, Tor and ZMQ.
Bitcoin Core debug logging in simple English
Bitcoin Core debug logging: Core 0.12 allowed all debugging with a bare debug or debug equal to one, or narrower categories including net, rpc, mempool, prune, http, tor and zmq.
Simple example
A node operator is checking Bitcoin Core debug logging. Record them only when required for an incident, restrict access and redact before sharing. Hashing addresses is not automatically anonymous when the candidate set is small.
Key terms in plain English
- Bitcoin Core:
- Widely used software that validates Bitcoin and can provide wallet, network and operator tools.
- RPC:
- A command that software sends to a node to request information or a local action.
- Mempool:
- A node’s changing local collection of valid, unconfirmed transactions.
- Node:
- A computer running Bitcoin software that checks data and communicates with other peers.
Category selection
Core 0.12 allowed all debugging with a bare debug or debug equal to one, or narrower categories including net, rpc, mempool, prune, http, tor and zmq. Enable the smallest category that answers the question. All-category logging raises volume, contention and disclosure risk and can obscure the relevant sequence.
IP address logging
The logips option controlled inclusion of peer IP addresses. Addresses can be personal data and reveal topology or provider relationships. Record them only when required for an incident, restrict access and redact before sharing. Hashing addresses is not automatically anonymous when the candidate set is small.
RPC and wallet sensitivity
Debug output and surrounding service logs may contain method names, transaction identifiers, addresses, paths or error text derived from user input. Credentials should never be logged, but operators must verify rather than assume redaction. Reproduce support cases with watch-only or disposable wallets wherever possible.
File permissions and rotation
debug.log belongs inside the protected data-directory boundary. Logrotate, journald or container collectors can copy it to broader storage or change ownership after rotation. Test rotation while the node runs, set bounded retention and ensure compressed archives inherit the intended permissions and deletion policy.
Timestamps and correlation
Timestamps help align node, pool, firewall and service-manager events; microsecond precision may assist concurrency analysis but increases correlation detail. Synchronise clocks securely and record timezone. Do not infer causation merely because peer and transaction events appear adjacent.
Support bundles
Create an allow-listed collector that selects known files and lines, redacts addresses, secrets and private paths, then shows the bundle for review. Never archive the entire data directory. Preserve hashes and collection time so a sanitised bundle remains useful evidence without including wallet or cookie files.
Incident exercise
Enable one category on an isolated node, reproduce the fault, disable it and inspect every emitted field. Rotate, compress, transfer to a restricted reviewer and delete by policy. Confirm alerts detect runaway growth and that disabling debug does not require an unsafe restart during an incident.
Frequently asked questions
What is the main point of Bitcoin Core debug logging?
Bitcoin Core debug logging: Core 0.12 allowed all debugging with a bare debug or debug equal to one, or narrower categories including net, rpc, mempool, prune, http, tor and zmq.
For Bitcoin Core debug logging, what should a beginner know about category selection?
Core 0.12 allowed all debugging with a bare debug or debug equal to one, or narrower categories including net, rpc, mempool, prune, http, tor and zmq.
For Bitcoin Core debug logging, what should a beginner know about ip address logging?
The logips option controlled inclusion of peer IP addresses. Addresses can be personal data and reveal topology or provider relationships.
For Bitcoin Core debug logging, what should a beginner know about rpc and wallet sensitivity?
Debug output and surrounding service logs may contain method names, transaction identifiers, addresses, paths or error text derived from user input.
Conclusion
Bitcoin Core debug logs are powerful evidence and a potential privacy record. Narrow categories, strict permissions, bounded retention and sanitised support workflows preserve their diagnostic value without turning an incident into a data leak.
Primary sources
Check the current specification status and the documentation for the exact implementation you operate before moving production funds or changing a mining node.
Join the ASIC Mining Discussion
Members can read and join the discussion
Log in to read comments from other miners. Create a free account if you would like to ask a question or share your experience.
Membership helps us protect the discussion from spam and keep answers useful.