Skip to content

Reduction in log message severity level ambiguity

Afonso Mukai requested to merge logging_improvements into master

Created by: SkyToGround

The ambiguity in the log message severity level required some attention and I have for this reason modified the logging code a bit. These are the changes I have made:

  • Added severity levels in the form of enum class Sev. This class is found in logger.h and defines 8 (syslog based) severity levels. The levels are commented in order to help you select which one to use.

  • dwlog() has been modified to require the severity level in the form of a enum class Sev instance.

  • All calls to dwlog() (the macro LOG) have been modified with a enum class Sev level to replace the previous int level.

  • The argument parsers of of kafka-to-nexus and send-command have been modified to take an explicit severity level (as an integer) instead of as previously, counting the number of occurrences of the -v flag.

I tried to infer the appropriate severity levels when replacing the old integer based severity levels. However, some one more familiar with the code should probably look through all calls to dwlog()(LOG), there are only 242 of them.

Merge request reports