Elly Jones | 03cd6d7 | 2012-06-11 13:04:28 -0400 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS 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 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 5 | #ifndef DEBUGD_SRC_LOG_TOOL_H_ |
| 6 | #define DEBUGD_SRC_LOG_TOOL_H_ |
Elly Jones | 03cd6d7 | 2012-06-11 13:04:28 -0400 | [diff] [blame] | 7 | |
Gaurav Shah | f6c8f2a | 2012-10-11 17:22:43 -0700 | [diff] [blame] | 8 | #include <map> |
Ben Chan | 5facf4a | 2014-07-23 16:36:54 -0700 | [diff] [blame] | 9 | #include <string> |
Elly Jones | 03cd6d7 | 2012-06-11 13:04:28 -0400 | [diff] [blame] | 10 | |
| 11 | #include <base/basictypes.h> |
| 12 | #include <dbus-c++/dbus.h> |
| 13 | |
| 14 | namespace debugd { |
| 15 | |
| 16 | class LogTool { |
| 17 | public: |
Ben Chan | 78f8953 | 2014-08-29 09:35:09 -0700 | [diff] [blame] | 18 | LogTool() = default; |
| 19 | ~LogTool() = default; |
Elly Jones | 03cd6d7 | 2012-06-11 13:04:28 -0400 | [diff] [blame] | 20 | |
Elly Jones | 533c7c4 | 2012-08-10 15:07:05 -0400 | [diff] [blame] | 21 | typedef std::map<std::string, std::string> LogMap; |
| 22 | |
Ben Chan | a0011d8 | 2014-05-13 00:19:29 -0700 | [diff] [blame] | 23 | std::string GetLog(const std::string& name, DBus::Error* error); |
| 24 | LogMap GetAllLogs(DBus::Error* error); |
| 25 | LogMap GetFeedbackLogs(DBus::Error* error); |
| 26 | LogMap GetUserLogFiles(DBus::Error* error); |
Darin Petkov | ce9b3a1 | 2013-01-10 16:38:54 +0100 | [diff] [blame] | 27 | |
Elly Jones | 03cd6d7 | 2012-06-11 13:04:28 -0400 | [diff] [blame] | 28 | private: |
Darin Petkov | ce9b3a1 | 2013-01-10 16:38:54 +0100 | [diff] [blame] | 29 | friend class LogToolTest; |
| 30 | |
| 31 | void AnonymizeLogMap(LogMap* log_map); |
| 32 | |
Elly Jones | 03cd6d7 | 2012-06-11 13:04:28 -0400 | [diff] [blame] | 33 | DISALLOW_COPY_AND_ASSIGN(LogTool); |
| 34 | }; |
| 35 | |
Ben Chan | a0011d8 | 2014-05-13 00:19:29 -0700 | [diff] [blame] | 36 | } // namespace debugd |
Elly Jones | 03cd6d7 | 2012-06-11 13:04:28 -0400 | [diff] [blame] | 37 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 38 | #endif // DEBUGD_SRC_LOG_TOOL_H_ |