Log Frontend Detailed Design#

Description#

The C++ frontend of mw::log provides the logging API (Logger, LogStream and the Log*() free functions), the configuration handling and the recorder creation. The backends implement the Recorder interface and register themselves in the backend table. This page links the diagrams of the C++ design to the component requirements. The explanation of the diagrams is in the pages below.

Rationale Behind Decomposition into Units#

The frontend is separated from the implementation details of the backends. The frontend depends only on the Recorder and IRecorderFactory interfaces, so that a backend can be added or removed at link time without changing the frontend. The units are the folders and files of score/mw/log, for example configuration, detail and detail/text_recorder.

Static Diagrams for Unit Interactions#

Log C++ configuration class diagram
status: valid
security: NO
safety: ASIL_B

Log C++ recorders class diagram
status: valid
security: NO
safety: ASIL_B

Log C++ console logging class diagram
status: valid
security: NO
safety: ASIL_B
tags: logging
bazel_module: score_baselibs
version: 1

Log C++ frontend dependency graph
status: valid
security: NO
safety: ASIL_B
tags: logging
bazel_module: score_baselibs
version: 1

Log C++ backend registration component diagram
status: valid
security: NO
safety: ASIL_B
tags: logging
bazel_module: score_baselibs
version: 1

Dynamic Diagrams for Unit Interactions#

Log C++ configuration sequence
status: valid
security: NO
safety: ASIL_B

Log C++ backend registration and recorder creation
status: valid
security: NO
safety: ASIL_B
tags: logging
bazel_module: score_baselibs
version: 1

Log C++ recorder factory decision flow
status: valid
security: NO
safety: ASIL_B
tags: logging
bazel_module: score_baselibs
version: 1

Log C++ slot allocation
status: valid
security: NO
safety: ASIL_B
tags: logging
bazel_module: score_baselibs
version: 1

Log C++ slot drainer sequence
status: valid
security: NO
safety: ASIL_B
tags: logging
bazel_module: score_baselibs
version: 1

Log C++ slot drainer flush
status: valid
security: NO
safety: ASIL_B
tags: logging
bazel_module: score_baselibs
version: 1

Log C++ wait-free stack push
status: valid
security: NO
safety: ASIL_B
tags: logging
bazel_module: score_baselibs
version: 1