Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ctkLogger #1181

Merged
merged 3 commits into from
Jan 17, 2024
Merged

Update ctkLogger #1181

merged 3 commits into from
Jan 17, 2024

Commits on Jan 17, 2024

  1. ENH: Refine order of ctkErrorLogLevel enum values

    This revisits the order of the `ctkErrorLogLevel` enum values to
    align with the typical log level hierarchy—from verbose (i.e., Debug) to
    less verbose (i.e., Critical). The "None" value has been moved to the end
    of the enum to ensure it holds the largest value.
    
    Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]>
    Punzo and jcfr committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    f2652b8 View commit details
    Browse the repository at this point in the history
  2. ENH: Update ctkLogger adding support for log level

    Set ctkLogger default level is set based on the build configuration.
    If a Debug build, the default log level is set as `ctkErrorLogLevel::LogLevel::Debug`
    and it set as `ctkErrorLogLevel::LogLevel::Warning` otherwise.
    
    The mapping of the logger functions is the following:
    
    * `ctkLogger::trace()` -> `qDebug()
    * `ctkLogger::debug()` -> `qDebug()`
    * `ctkLogger::info()` -> `qInfo()`
    * `ctkLogger::warn()` -> `qWarning()`
    * `ctkLogger::error()` -> `qCritical()`
    * `ctkLogger::fatal()` -> `qCritical()`
    
    For convenience, the order of the function declaration has been updated
    to match the ordering of log level (Trace < Fatal).
    
    Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]>
    Punzo and jcfr committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    9ad5ca4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    356fb51 View commit details
    Browse the repository at this point in the history