Log Requirements
status: valid
security: NO
safety: ASIL_B
tags: log
version: 1

Log Frontend Requirements#

Configuration#

Logging Configuration File Location
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1
satisfied by: comp__log

The application specific file shall be the first valid configuration file from the following locations.

  1. location pointed to by the environmental variable MW_LOG_CONFIG_FILE

  2. <cwd>/etc/logging.json

  3. <cwd>/logging.json

  4. <binary path>/../etc/logging.json

Logging Global Configuration File
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1
satisfied by: comp__log

mw::log shall load configurations from a global configuration file.

The global configuration shall be loaded from /etc/ecu_logging_config.json

Logging Configuration File Defaults
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1
satisfied by: comp__log

mw::log shall fall back to a default value for a configuration item that is not available from the configuration files.

These are hard-coded in the library.

Logging Configuration Precedence
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1
satisfied by: comp__log

For each configuration field, mw::log shall resolve values using the following precedence order:

  1. Application configuration file

  2. Global configuration file

  3. Defaults

Logging Configuration Syntax Errors Handling
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1

mw::log shall discard any configuration files with syntax errors and continue using other sources of configuration.

Logging Configuration Invalid Settings Handling
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1

mw::log shall discard any invalid configuration fields.

Invalid meaning that the value is not in the expected range or format.

Configuration Fields#

Logging Configuration Log Storage Device
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1
satisfied by: comp__log

mw::log shall support configuration of a file path specifying where log are written.

Logging Configuration Internal Buffer Size
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1

mw::log shall allow configuration of the size of the internal buffer.

Logging Configuration Log ECU Identifier
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1

mw::log shall support configuration of an ECU log identifier, which shall be a DLT-style ASCII uppercase 4 character string.

Logging Configuration Log Application Identifier
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1

mw::log shall support configuration of an application log identifier, which shall be a DLT-style ASCII uppercase 4 character string.

Log Handling#

Message Loss Detection
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1

mw::log shall detect and report any message loss.

Custom Log Types
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1

mw::log shall allow extensions for custom log types.

Log Message Format#

Local Timestamp
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1

mw::log shall attach a local timestamp to each log entry.

System Backend#

System Logger Backend
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1
satisfied by: comp__log

mw::log shall support logging of slog backed for QNX deployments.

Console Backend#

Console Backend Stdout Sink
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Functional
version: 1
satisfied by: comp__log

mw::log shall support output log messages to stdout when running unit tests.

Compatibility#

Compatibility Supported Operating Systems
status: valid
security: NO
safety: ASIL_B
tags: logging
reqtype: Interface
version: 1
satisfied by: comp__log

mw::log shall support QNX and Linux operating systems, encapsulated via OSAL.

Compatibility Supported Programming Languages
status: valid
security: NO
safety: ASIL_B

mw::log shall provide a logging API for C++ and Rust.