Clarify about static variables in logging.cc.

Bug: None
Change-Id: Ia6c751485b5b0a88ce34106a2159fe8af52fc41c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237321
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35554}
This commit is contained in:
Byoungchan Lee
2021-12-16 17:11:03 +09:00
committed by WebRTC LUCI CQ
parent a13788bd15
commit be87f0a0f3

View File

@ -55,13 +55,15 @@ namespace rtc {
namespace {
// By default, release builds don't log, debug builds at info level
#if !defined(NDEBUG)
static LoggingSeverity g_min_sev = LS_INFO;
static LoggingSeverity g_dbg_sev = LS_INFO;
constexpr LoggingSeverity kDefaultLoggingSeverity = LS_INFO;
#else
static LoggingSeverity g_min_sev = LS_NONE;
static LoggingSeverity g_dbg_sev = LS_NONE;
constexpr LoggingSeverity kDefaultLoggingSeverity = LS_NONE;
#endif
// Note: `g_min_sev` and `g_dbg_sev` can be changed while running.
LoggingSeverity g_min_sev = kDefaultLoggingSeverity;
LoggingSeverity g_dbg_sev = kDefaultLoggingSeverity;
// Return the filename portion of the string (that following the last slash).
const char* FilenameFromPath(const char* file) {
const char* end1 = ::strrchr(file, '/');