/src/osquery/plugins/logger/syslog_logger.h
Line | Count | Source (jump to first uncovered line) |
1 | | #pragma once |
2 | | |
3 | | /** |
4 | | * Copyright (c) 2014-present, The osquery authors |
5 | | * |
6 | | * This source code is licensed as defined by the LICENSE file found in the |
7 | | * root directory of this source tree. |
8 | | * |
9 | | * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only) |
10 | | */ |
11 | | |
12 | | #include <syslog.h> |
13 | | |
14 | | #include <string> |
15 | | #include <vector> |
16 | | |
17 | | #include <osquery/core/plugins/logger.h> |
18 | | #include <osquery/registry/registry_factory.h> |
19 | | |
20 | | namespace osquery { |
21 | | |
22 | | class SyslogLoggerPlugin : public LoggerPlugin { |
23 | | public: |
24 | 0 | bool usesLogStatus() override { |
25 | 0 | return true; |
26 | 0 | } |
27 | | |
28 | | protected: |
29 | | Status logString(const std::string& s) override; |
30 | | void init(const std::string& name, |
31 | | const std::vector<StatusLogLine>& log) override; |
32 | | Status logStatus(const std::vector<StatusLogLine>& log) override; |
33 | | }; |
34 | | |
35 | | REGISTER(SyslogLoggerPlugin, "logger", "syslog"); |
36 | | } |
37 | | |
38 | | |