Skip to content

Feat[Backend]: logging module in station crate - #685

Open
pminmic wants to merge 11 commits into
backend/netfrom
backend/logging
Open

pminmic wants to merge 11 commits into
backend/netfrom
backend/logging

Conversation

@pminmic

@pminmic pminmic commented Dec 2, 2026 •

Copy link
Copy Markdown

Summary

Adds station::logging to persist backend events into recording sessions using software_core::logger.

  • Creates timestamped backend and session directories under the configurable logging_path.
  • Stores session metadata and selected variables in logger_settings.json.
  • Writes headerless CSVs for measurements, protections, orders and messages.
  • Consumes the existing ToLogging channel directly on a dedicated writer thread, resolving metadata through the shared ADJ and protocol Index.
  • Provides session controls, buffered writes, periodic flushing and orderly shutdown.
  • Stops recording on write failures or observed input saturation while keeping the event receiver alive for subsequent sessions.

Orders are recorded after TCP confirmation, with the confirmed OrderPacket serialized as compact JSON. Protection durations come from their ADJ definitions.

Extra

  • Little modification in software_core::logger, in the CSV implementation: add method instant.

Follow-up work

Application startup and WebSocket control wiring remain pending. The planned integration is documented in WEBSOCKET_INTEGRATION.md.

Trace output and ADJ validator execution remain outside this implementation.

@pminmic
pminmic marked this pull request as ready for review December 3, 2026 14:44

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant