summaryrefslogtreecommitdiffstats
path: root/logd/src/logd/forwarder.h
blob: b26abf0165834c340fada516697cab436378cae1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <string_view>

namespace logdemon {

/**
 * Interface used to forward log lines to something.
 */
class Forwarder {
public:
    virtual ~Forwarder() {}
    virtual void sendMode() = 0;
    virtual void forwardLine(std::string_view log_line) = 0;
    virtual void flush() = 0;
    virtual int badLines() const = 0;
    virtual void resetBadLines() = 0;
};

}