summaryrefslogtreecommitdiffstats
path: root/logd/src/logd/forwarder.h
diff options
context:
space:
mode:
Diffstat (limited to 'logd/src/logd/forwarder.h')
-rw-r--r--logd/src/logd/forwarder.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/logd/src/logd/forwarder.h b/logd/src/logd/forwarder.h
new file mode 100644
index 00000000000..a0a1c5f1ea5
--- /dev/null
+++ b/logd/src/logd/forwarder.h
@@ -0,0 +1,19 @@
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#pragma once
+
+namespace logdemon {
+
+/**
+ * Interface used to forward log lines to something.
+ */
+class Forwarder {
+public:
+ virtual ~Forwarder() {}
+ virtual void sendMode() = 0;
+ virtual void forwardLine(const char *line, const char *eol) = 0;
+ virtual int badLines() const = 0;
+ virtual void resetBadLines() = 0;
+};
+
+}