Mechanism for toggling logging. #2

Closed
opened 2024-06-16 01:03:43 -04:00 by josh · 1 comment
Owner
No description provided.
josh was assigned by maxine 2024-06-24 19:39:43 -04:00
maxine self-assigned this 2024-06-24 19:39:44 -04:00
maxine added the
Status
Need More Info
label 2024-06-24 19:39:48 -04:00
Collaborator
    /// Severity levels for logging. Higher numbers filter less messages out.
    /// @see LOG_LEVEL macro
    enum class severity : uint8_t
    {
        none,       // Show no output
        fatal,      // Show only fatal errors
        error,      // Show fatal and not-necessarily-fatal errors
        warning,    // Show warnings additionally
        verbose,    // Show errors, warnings, and 'verbose' output (i.e. extra information)
        debug,      // Show debugging messages (Basically everything).
    };
#define INFO(i)    if (jlog::loglevel >= jlog::severity::none) { jlog::log(jlog::info_detailed_format(i, FUNCTION, __FILE__, __LINE__)); }

Pretty sure this is already done, so I'm closing this issue.

``` /// Severity levels for logging. Higher numbers filter less messages out. /// @see LOG_LEVEL macro enum class severity : uint8_t { none, // Show no output fatal, // Show only fatal errors error, // Show fatal and not-necessarily-fatal errors warning, // Show warnings additionally verbose, // Show errors, warnings, and 'verbose' output (i.e. extra information) debug, // Show debugging messages (Basically everything). }; ``` ``` #define INFO(i) if (jlog::loglevel >= jlog::severity::none) { jlog::log(jlog::info_detailed_format(i, FUNCTION, __FILE__, __LINE__)); } ``` Pretty sure this is already done, so I'm closing this issue.
Sign in to join this conversation.
No description provided.