Skip to content

Logging: Add conditional logging macros. #3

@pyjarrett

Description

@pyjarrett

Purpose

Extend the logging system to allow logging which doesn't trigger on every line hit.

Method

Extend the logging system to include conditional logging variations of the existing CN_ERROR, CN_WARN and CN_TRACE macros to include these variations:

  • *_IF(condition, msg, ...) - only log if the given condition is met
  • *_EVERY(num, msg, ...) - only log every num times this log line is encountered
  • *_ONCE(msg, ...) - only log the first time this log line is encountered

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions