[email protected] | b72a774 | 2013-05-16 09:10:39 | [diff] [blame] | 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 | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOGGER_H_ | ||||
6 | #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOGGER_H_ | ||||
7 | |||||
8 | #include <string> | ||||
9 | #include <vector> | ||||
10 | |||||
[email protected] | cbb502ba | 2013-05-27 14:35:26 | [diff] [blame] | 11 | #include "base/location.h" |
12 | #include "base/logging.h" | ||||
lukasza | 8acc4eb | 2015-07-20 20:57:20 | [diff] [blame] | 13 | #include "components/drive/event_logger.h" |
[email protected] | b72a774 | 2013-05-16 09:10:39 | [diff] [blame] | 14 | |
15 | namespace sync_file_system { | ||||
16 | // Originally wanted to use 'logging' here, but it conflicts with | ||||
17 | // base/logging.h, and breaks DCHECK() and friends. | ||||
18 | namespace util { | ||||
19 | |||||
[email protected] | cbb502ba | 2013-05-27 14:35:26 | [diff] [blame] | 20 | // Resets the log. |
21 | void ClearLog(); | ||||
22 | |||||
[email protected] | b72a774 | 2013-05-16 09:10:39 | [diff] [blame] | 23 | // Logs a message using printf format. |
24 | // This function can be called from any thread. | ||||
[email protected] | cbb502ba | 2013-05-27 14:35:26 | [diff] [blame] | 25 | void Log(logging::LogSeverity level, |
26 | const tracked_objects::Location& location, | ||||
27 | const char* format, | ||||
28 | ...) | ||||
29 | PRINTF_FORMAT(3, 4); | ||||
[email protected] | b72a774 | 2013-05-16 09:10:39 | [diff] [blame] | 30 | |
31 | // Returns the log history. | ||||
32 | // This function can be called from any thread. | ||||
[email protected] | 6b0dfcdb | 2013-07-04 07:05:00 | [diff] [blame] | 33 | std::vector<drive::EventLogger::Event> GetLogHistory(); |
[email protected] | b72a774 | 2013-05-16 09:10:39 | [diff] [blame] | 34 | |
35 | } // namespace util | ||||
36 | } // namespace sync_file_system | ||||
37 | |||||
38 | #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOGGER_H_ |