Skip to content

[UPD] log unit-tests to account for more log cases

Maxence Naud requested to merge standardize_logger into dev

Context

This MR aims at standardizing the logger informations.

Classical log informations are of the type: TIMESTAMP [LEVEL] [THREAD] [COMPONENT/CLASS] - Message. However, for libraries like aidge, only [LEVEL] - Message details matter.

When running the new Test_Log.cpp with the old log system, here is what it displayed:

this is a debug message
green debug
this is an info message
this is a notice message
this is a warn message
this is an error message
Context: Testing the context of logger
fatal
Context: Testing the context of logger
Now debug messages are supposed to [appear].
Context: Testing the context of logger
Current consol level is 0

It is not possible to see it here but messages were colored according to the level of the warning.

The new logging system looks something like this:

[DEBUG] - this is a debug message
[DEBUG] - green debug
[INFO] - this is an info message
[NOTICE] - this is a notice message
[WARNING] - this is a warn message
[ERROR] - this is an error message
Context: Testing the context of logger
[FATAL] - fatal
Context: Testing the context of logger
[DEBUG] - Now debug messages are supposed to [appear].
Context: Testing the context of logger
[INFO] - Current consol level is DEBUG

Keywords ("DEBUG", "INFO", ...) are colored but messages are not.

Modified files

Detailed major modifications

Edited by Maxence Naud

Merge request reports

Loading