Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/webrtc_overrides/webrtc/base/diagnostic_logging.h

Issue 1982643002: Fix backwards WebRTC-in-Chromium override and expose Chromium logging setup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More comments and a new case(LS_NONE) Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/webrtc_overrides/webrtc/base/diagnostic_logging.h
diff --git a/third_party/webrtc_overrides/webrtc/base/diagnostic_logging.h b/third_party/webrtc_overrides/webrtc/base/diagnostic_logging.h
index 3a29c3afe961b99eb8985e7b768ca4285730b9a4..dad634c8072b4dbcc46091db03092a9d34c59eb8 100644
--- a/third_party/webrtc_overrides/webrtc/base/diagnostic_logging.h
+++ b/third_party/webrtc_overrides/webrtc/base/diagnostic_logging.h
@@ -49,15 +49,21 @@ std::string ErrorName(int err, const ConstantLabel* err_table);
// in debug builds.
// LS_WARNING: Something that may warrant investigation.
// LS_ERROR: Something that should not have occurred.
+// LS_NONE: A level < LS_ERROR, used to disable logging.
// Note that LoggingSeverity is mapped over to chromiums verbosity levels where
// anything lower than or equal to the current verbosity level is written to
// file which is the opposite of logging severity in libjingle where higher
// severity numbers than or equal to the current severity level are written to
// file. Also, note that the values are explicitly defined here for convenience
// since the command line flag must be set using numerical values.
+//
+// LS_NONE is present so we can LogToDebug(LS_NONE) i.e. for ordinal
+// comparisons with other log levels.
+//
// TODO(tommi): To keep things simple, we should just use the same values for
// these constants as Chrome does.
-enum LoggingSeverity { LS_ERROR = 1,
+enum LoggingSeverity { LS_NONE = 0,
+ LS_ERROR = 1,
LS_WARNING = 2,
LS_INFO = 3,
LS_VERBOSE = 4,
@@ -130,7 +136,7 @@ class LogMultilineState {
class LogMessage {
public:
- static void LogToDebug(int min_sev);
+ static void LogToDebug(LoggingSeverity min_sev);
};
// When possible, pass optional state variable to track various data across
« no previous file with comments | « no previous file | third_party/webrtc_overrides/webrtc/base/logging.h » ('j') | third_party/webrtc_overrides/webrtc/base/logging.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698