dlr-gtlab / gt-logging

Basic C++14 logging library based on QsLog
1 stars 1 forks source link

Verbose option for the logging system #29

Closed rainman110 closed 11 months ago

rainman110 commented 2 years ago

In GitLab by @jensschmeink on Oct 20, 2022, 08:41

Idea from Martin:

I don't really like, that there is now a verbose parameter totally unrelated to the actual functionality of the function.

This in particular looks weird from the caller side, e.g. m_valid = loadMetaData(!gtApp->batchMode()); where it is not really clear, what the batchMode has to do with meta data at first sight.

To respect the single responsibility principle, I favor for delegating verbose / non-verbose output to the logging.

Example:

gtWarning().verbose() << "this is a verbose message";

This will only be printed, if we declare first

logger.setVerbosity(VERBOSE); // instead of logger.setVerbosity(SILENT);

What do you think about this?

rainman110 commented 2 years ago

In GitLab by @jensschmeink on Oct 20, 2022, 08:41

created branch 29-verbose-option-for-the-logging-system to address this issue

rainman110 commented 2 years ago

In GitLab by @rainman110 on Oct 20, 2022, 14:59

created branch 29-verbose-option-for-the-logging-system-2 to address this issue

rainman110 commented 2 years ago

In GitLab by @jensschmeink on Oct 25, 2022, 11:31

mentioned in commit 211eaa3c6073e29acea046382dee11042a5a9e27