Skip to content

Logging (Developer Guide)

What It Does

Logging is configured through logging_module.config.setup_logging() and category-based routing in logging_module.utils.

Why It Exists

Operator workflows require separate logs for auth, REST, WS, broker, and data feed events.

Config Dependencies

  • config/logging_config.yaml

With Backtrader

Call setup_logging() before creating the Store/Broker/DataFeed.

Without Backtrader

Use the same logging setup so scripts and adapters behave consistently.

Limitations

  • Avoid logging secrets or full payloads.
  • High-volume WS logs should be sampled.

Scenario Example

Scenario: You need to audit all order errors. - Route FYERS_BROKER and FYERS_REST categories to dedicated error logs.