Summary
To elevate the project to an industry level, we need comprehensive logging across modules. Add structured logging to capture key events, errors, and metrics.
Tasks
- Add
log and env_logger dependencies to Cargo.toml with appropriate features.
- Create a new module
src/logging/mod.rs that exposes a function init_logging() which initializes the logger using env_logger.
- Configure the logger to read log level from the
RUST_LOG environment variable with a sensible default (e.g. info).
- Use
log::info!, log::debug!, log::warn!, and log::error! macros in critical modules (solver, matching, routing, pricing, adapters, bridge, strategies) to record lifecycle events, decisions, and errors.
- Update the CLI binary and daemon service to call
logging::init_logging() at startup.
- Add documentation to the README explaining how to set
RUST_LOG for different environments and how to interpret logs.
- Provide unit tests (or integration tests) that verify logging initialization does not panic and respects log level configuration.
Acceptance Criteria
- When running the solver or daemon, logs are printed to stdout with timestamps and module names.
- Changing
RUST_LOG=debug in the environment enables debug-level logs.
- The logger must not impede performance or crash the application.
- The README is updated with logging instructions.
Summary
To elevate the project to an industry level, we need comprehensive logging across modules. Add structured logging to capture key events, errors, and metrics.
Tasks
logandenv_loggerdependencies toCargo.tomlwith appropriate features.src/logging/mod.rsthat exposes a functioninit_logging()which initializes the logger usingenv_logger.RUST_LOGenvironment variable with a sensible default (e.g.info).log::info!,log::debug!,log::warn!, andlog::error!macros in critical modules (solver, matching, routing, pricing, adapters, bridge, strategies) to record lifecycle events, decisions, and errors.logging::init_logging()at startup.RUST_LOGfor different environments and how to interpret logs.Acceptance Criteria
RUST_LOG=debugin the environment enables debug-level logs.