NONE = 1,
MIN_LEVEL = 1,
- DEBUG = 900,
+ // "DBG" is the lowest (aka most verbose) debug log level.
+ // This level is intended to be primarily used in log category settings.
+ // In your code it is usually better to use one of the finer-grained DBGn
+ // levels. In your log category settings you can then set the log category
+ // level to a specific DBGn level, or to to main DBG level to enable all DBGn
+ // messages.
+ //
+ // This is named "DBG" rather than "DEBUG" since some open source projects
+ // define "DEBUG" as a preprocessor macro.
+ DBG = 900,
+
DBG0 = 1000,
DBG1 = 999,
DBG2 = 998,
WARN = 3000,
WARNING = 3000,
- // Unfortunately Windows headers #define ERROR
- // On Windows platforms we avoid defining ERROR. However we make it
- // available on other platforms, to make it easier to convert code from
- // other log libraries that also use ERROR as their log level name (e.g.,
- // glog).
+ // Unfortunately Windows headers #define ERROR, so we cannot use
+ // it as an enum value name. We only provide ERR instead.
ERR = 4000,
CRITICAL = 5000,
return folly::kIsDebug ? (level >= LogLevel::DFATAL)
: (level >= LogLevel::FATAL);
}
-}
+} // namespace folly