Andreea Costinas | 4483361 | 2020-01-14 13:21:50 +0100 | [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 | #include <base/logging.h> |
| 6 | #include <brillo/syslog_logging.h> |
| 7 | |
Andreea Costinas | 942284d | 2020-01-28 16:28:40 +0100 | [diff] [blame^] | 8 | #include "system-proxy/system_proxy_daemon.h" |
| 9 | |
Andreea Costinas | 4483361 | 2020-01-14 13:21:50 +0100 | [diff] [blame] | 10 | int main(int /* argc */, char* /* argv */[]) { |
| 11 | brillo::OpenLog("system_proxy", true /* log_pid */); |
| 12 | brillo::InitLog(brillo::kLogToSyslog | brillo::kLogToStderrIfTty); |
| 13 | |
Andreea Costinas | 942284d | 2020-01-28 16:28:40 +0100 | [diff] [blame^] | 14 | // Run daemon. |
| 15 | LOG(INFO) << "system_proxy starting"; |
| 16 | system_proxy::SystemProxyDaemon daemon; |
| 17 | int result = daemon.Run(); |
| 18 | LOG(INFO) << "system_proxy stopping with exit code " << result; |
| 19 | |
| 20 | return result; |
Andreea Costinas | 4483361 | 2020-01-14 13:21:50 +0100 | [diff] [blame] | 21 | } |