Logging

This adds a Logging "library" to the ECSS Services repo. This library allows logging messages with different severities, and allows the user of the services to choose which severity they want displayed.

A comparison between Google (glog), spdlog, plog and Boost::Log was made, and we decided to go with a custom lite solution, also compatible with etl::string.

The following log levels are supported, but they are up for discussion:

Level Description
trace Very detailed information, useful for tracking the individual steps of an operation.
debug General debugging information.
info Noteworthy or periodical events.
notice Uncommon but expected events.
warning Unexpected events that do not compromise the operability of a function.
error Unexpected failure of an operation.
emergency Unexpected failure that renders the entire system unusable.
disabled Use this log level to disable logging entirely. No message should be logged as disabled.

The library uses #defines that allow logging in this way:

LOG_ERROR << "Configuration not found";
LOG_INFO << "The camera took " << 15 << " pictures today";
LOG_DEBUG << "Ran function " << functionName << " with " << getId(functionName);

Closes #18 (closed).

It is lite enough to be used on a microcontroller.

See https://acubesat.gitlab.io/obc/ecss-services/docs/logging/classLogger.html for more detailed documentation of the Logger functionality.

The following images show a sample log output on x86 and on an MCU via UART:
Log output on x86Log output on MCU

Edited by Konstantinos Kanavouras

Merge request reports

Loading