Yoshiki Iguchi | c4ac5f9 | 2020-12-01 04:17:45 +0900 | [diff] [blame] | 1 | // Copyright 2020 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 | |
| 5 | #ifndef SYSLOG_CAT_SYSLOGCAT_H_ |
| 6 | #define SYSLOG_CAT_SYSLOGCAT_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
| 11 | namespace base { |
| 12 | class FilePath; |
| 13 | }; |
| 14 | |
| 15 | // Executes the specified command with redirecting its stdout and stderr to the |
| 16 | // specified unix domain socket. This also sets up the socket by sending |
| 17 | // headers, |
| 18 | void ExecuteCommandWithRedirection( |
| 19 | const std::string& target_command_str, |
| 20 | const std::vector<const char*>& target_command_argv, |
| 21 | const std::string& identifier, |
| 22 | int severity_stdout, |
| 23 | int severity_stderr, |
| 24 | const base::FilePath& socket_path_stdout, |
| 25 | const base::FilePath& socket_path_stderr); |
| 26 | |
| 27 | #endif // SYSLOG_CAT_SYSLOGCAT_H_ |