Function convertFromString

Synopsis

#include <src/easylogging++.h>

static Level convertFromString(const char *levelStr)

Description

Converts from levelStr to Level.

Parameters

levelStr - Upper case string based level. Lower case is also valid but providing upper case is recommended.

Source

Lines 165-172 in src/easylogging++.cc. Line 628 in src/easylogging++.h.

Level LevelHelper::convertFromString(const char* levelStr) {
  for (auto& item : stringToLevelMap) {
    if (base::utils::Str::cStringCaseEq(levelStr, item.levelString)) {
      return item.level;
    }
  }
  return Level::Unknown;
}





Add Discussion

Log in to comment