system_addLogFilter - Bittensor RPC Method
Add a log filter to a running Bittensor node. Administrative method, not available on public RPC.
Adds a log filter directive to the running Bittensor node, modifying its logging output in real time. Log filters use the same syntax as the RUST_LOG environment variable (e.g. "sync=debug", "runtime=trace"). This is an administrative method that requires --rpc-methods unsafe and is not available on public shared RPC endpoints.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
directives | string | Yes | Log filter directive string using RUST_LOG syntax (e.g. "sync=debug", "runtime::executive=trace"). |
Response
| Field | Type | Description |
|---|---|---|
result | null | Confirms the log filter has been added. |
Code Examples
Use Cases
- Runtime debugging -- Temporarily increase log verbosity for specific modules to diagnose issues on a self-hosted Bittensor node.
- Performance investigation -- Enable trace-level logging for block import or consensus modules to investigate performance bottlenecks.
- Selective logging -- Add targeted filters for specific pallets or subsystems without restarting the node.
Notes
- This is an unsafe/administrative method. Disabled on public RPC endpoints including Dwellir's shared Bittensor nodes.
- Filter directives follow the
env_logger/RUST_LOGformat:target=level(e.g."grandpa=trace","txpool=debug"). - Use
system_resetLogFilterto revert to default logging levels. - Adding very verbose filters (trace/debug) can significantly impact node performance.
Related Methods
system_resetLogFilter-- Reset log filters to defaultssystem_nodeRoles-- Check node rolessystem_syncState-- Check sync state for debugging