blob: 06d498f858f117f636381d3072eb920edb792326 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "log-target.h"
namespace ns_log {
class LogTargetFd : public LogTarget {
private:
int _fd;
bool _istty;
LogTargetFd();
LogTargetFd(const LogTargetFd&);
LogTargetFd& operator = (const LogTargetFd);
public:
explicit LogTargetFd(const char *target);
int write(const char *buf, int len) override;
~LogTargetFd();
bool makeHumanReadable() const override { return _istty; }
};
} // end namespace log
|