OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOGGER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOGGER_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOGGER_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOGGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "base/logging.h" |
11 #include "chrome/browser/google_apis/event_logger.h" | 12 #include "chrome/browser/google_apis/event_logger.h" |
12 | 13 |
13 namespace sync_file_system { | 14 namespace sync_file_system { |
14 // Originally wanted to use 'logging' here, but it conflicts with | 15 // Originally wanted to use 'logging' here, but it conflicts with |
15 // base/logging.h, and breaks DCHECK() and friends. | 16 // base/logging.h, and breaks DCHECK() and friends. |
16 namespace util { | 17 namespace util { |
17 | 18 |
| 19 // Resets the log. |
| 20 void ClearLog(); |
| 21 |
18 // Logs a message using printf format. | 22 // Logs a message using printf format. |
19 // This function can be called from any thread. | 23 // This function can be called from any thread. |
20 void Log(const char* format, ...) PRINTF_FORMAT(1, 2); | 24 void Log(logging::LogSeverity level, const char* format, ...) |
| 25 PRINTF_FORMAT(2, 3); |
21 | 26 |
22 // Returns the log history. | 27 // Returns the log history. |
23 // This function can be called from any thread. | 28 // This function can be called from any thread. |
24 std::vector<google_apis::EventLogger::Event> GetLogHistory(); | 29 std::vector<google_apis::EventLogger::Event> GetLogHistory(); |
25 | 30 |
26 } // namespace util | 31 } // namespace util |
27 } // namespace sync_file_system | 32 } // namespace sync_file_system |
28 | 33 |
29 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOGGER_H_ | 34 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOGGER_H_ |
OLD | NEW |