Skip to content

Logging (src/logging_module/)

Logging is configured from YAML and uses categories so that high-volume traffic can be sampled and operational errors can be routed cleanly.

flowchart TD
    APP["Application code<br/>(Store/Broker/DataFeed/Adapters)"] --> LOGGER["get_logger(..., category=...)"]
    LOGGER --> CONFIG["setup_logging()<br/>(logging_module/config.py)"]
    CONFIG --> FILES["File handlers<br/>(config/logging_config.yaml)"]
    FAIL_PATH["invalid log path<br/>startup error"]

    FILES --> TRADING["logs/trading.log"]
    FILES --> REST["logs/fyers_rest_errors.log"]
    FILES --> WS["logs/fyers_ws_errors.log"]
    FILES --> BROKER["logs/fyers_broker_errors.log"]
    FILES --> AUTH["logs/fyers_auth_errors.log"]
    FILES --> DEBUG["logs/debug.log"]

    CONFIG -.bad handler path.-> FAIL_PATH