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: chrome/browser/chromeos/drive/logging.cc

Issue 20609006: Add severity info to drive::EventLogger. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase - the 2nd try - Created 7 years, 5 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: chrome/browser/chromeos/drive/logging.cc
diff --git a/chrome/browser/chromeos/drive/logging.cc b/chrome/browser/chromeos/drive/logging.cc
index 48702a1529335dfb150c8883f3f49e3793b18ea7..40c205a48dcada112c7f392b4443b69378304461 100644
--- a/chrome/browser/chromeos/drive/logging.cc
+++ b/chrome/browser/chromeos/drive/logging.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/chromeos/drive/logging.h"
+#include <stdarg.h> // va_list
+
#include "base/lazy_instance.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/drive/event_logger.h"
@@ -17,7 +19,7 @@ static base::LazyInstance<EventLogger> g_logger =
} // namespace
-void Log(const char* format, ...) {
+void Log(logging::LogSeverity severity, const char* format, ...) {
std::string what;
va_list args;
@@ -25,10 +27,12 @@ void Log(const char* format, ...) {
base::StringAppendV(&what, format, args);
va_end(args);
+ DVLOG(1) << what;
+
// On thread-safety: LazyInstance guarantees thread-safety for the object
// creation. EventLogger::Log() internally maintains the lock.
EventLogger* ptr = g_logger.Pointer();
- ptr->Log("%s", what.c_str());
+ ptr->Log(severity, what);
}
std::vector<EventLogger::Event> GetLogHistory() {
« no previous file with comments | « chrome/browser/chromeos/drive/logging.h ('k') | chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698