Changeset 875 for cpp/common/loggers


Ignore:
Timestamp:
05/06/19 13:14:56 (6 years ago)
Author:
Maciej Komosinski
Message:

Better use of LOG_level constants

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/loggers/loggertostdout.cpp

    r874 r875  
    55#include "loggertostdout.h"
    66#include <common/console.h>
     7#include <assert.h>
    78#ifdef SHP
    89#include <FBaseSys.h> //AppLog
     
    3637        else
    3738        {
    38                 if (level < -1) level = -1; else if (level > 3) level = 3;
     39                assert((level>=LOG_MIN) && (level<=LOG_MAX));
     40                level = min(LOG_MAX, max(LOG_MIN, level));
    3941                printf(log_format, log_level[level + 1], obj, method, msg, "\n");
    4042        }
Note: See TracChangeset for help on using the changeset viewer.