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:

committed by
WebRTC LUCI CQ

parent
a13788bd15
commit
be87f0a0f3
@ -55,13 +55,15 @@ namespace rtc {
|
|||||||
namespace {
|
namespace {
|
||||||
// By default, release builds don't log, debug builds at info level
|
// By default, release builds don't log, debug builds at info level
|
||||||
#if !defined(NDEBUG)
|
#if !defined(NDEBUG)
|
||||||
static LoggingSeverity g_min_sev = LS_INFO;
|
constexpr LoggingSeverity kDefaultLoggingSeverity = LS_INFO;
|
||||||
static LoggingSeverity g_dbg_sev = LS_INFO;
|
|
||||||
#else
|
#else
|
||||||
static LoggingSeverity g_min_sev = LS_NONE;
|
constexpr LoggingSeverity kDefaultLoggingSeverity = LS_NONE;
|
||||||
static LoggingSeverity g_dbg_sev = LS_NONE;
|
|
||||||
#endif
|
#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).
|
// Return the filename portion of the string (that following the last slash).
|
||||||
const char* FilenameFromPath(const char* file) {
|
const char* FilenameFromPath(const char* file) {
|
||||||
const char* end1 = ::strrchr(file, '/');
|
const char* end1 = ::strrchr(file, '/');
|
||||||
|
Reference in New Issue
Block a user