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

Unified Diff: chrome/browser/drive/event_logger.h

Issue 20609006: Add severity info to drive::EventLogger. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/drive/event_logger.h
diff --git a/chrome/browser/drive/event_logger.h b/chrome/browser/drive/event_logger.h
index 95a10e6673f0ca53ecbc208858c52d69ee7ecbb8..9f3d9ca1098d04724f9a484a60ae8e4e4954d4bf 100644
--- a/chrome/browser/drive/event_logger.h
+++ b/chrome/browser/drive/event_logger.h
@@ -5,13 +5,13 @@
#ifndef CHROME_BROWSER_DRIVE_EVENT_LOGGER_H_
#define CHROME_BROWSER_DRIVE_EVENT_LOGGER_H_
-#include <stdarg.h> // va_list
#include <deque>
#include <string>
#include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/logging.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
@@ -27,8 +27,9 @@ class EventLogger {
public:
// Represents a single event log.
struct Event {
- Event(int id, const std::string& what);
+ Event(int id, logging::LogSeverity severity, const std::string& what);
int id; // Monotonically increasing ID starting from 0.
+ logging::LogSeverity severity; // Severity of the event.
base::Time when; // When the event occurred.
std::string what; // What happened.
};
@@ -39,9 +40,7 @@ class EventLogger {
// Logs a message using printf format.
hashimoto 2013/08/01 06:19:59 nit: Fix this comment.
kinaba 2013/08/01 06:37:49 Done.
// Can be called from any thread as long as the object is alive.
- // Note that PRINTF_FORMAT should be (2, 3) instead of (1, 2) as this is a
- // C++ member function.
- void Log(const char* format, ...) PRINTF_FORMAT(2, 3);
+ void Log(logging::LogSeverity severity, const std::string& what);
// Sets the history size. The existing history is cleared.
// Can be called from any thread as long as the object is alive.
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc ('k') | chrome/browser/drive/event_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698