Docs

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

ParameterTypeRequiredDescription
directivesstringYesLog filter directive string using RUST_LOG syntax (e.g. "sync=debug", "runtime::executive=trace").

Response

FieldTypeDescription
resultnullConfirms 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_LOG format: target=level (e.g. "grandpa=trace", "txpool=debug").
  • Use system_resetLogFilter to revert to default logging levels.
  • Adding very verbose filters (trace/debug) can significantly impact node performance.