aboutsummaryrefslogtreecommitdiffstats
path: root/yt/yt/core/logging/stream_output.cpp
blob: 6c8349051af52088c2294ae06174d25db00922e6 (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
26
27
28
29
30
31
32
#include "stream_output.h"

namespace NYT::NLogging {

////////////////////////////////////////////////////////////////////////////////

TFixedBufferFileOutput::TFixedBufferFileOutput(
    TFile file,
    size_t bufferSize)
    : Underlying_(bufferSize, file)
{
    Underlying_.SetFinishPropagateMode(true);
}

void TFixedBufferFileOutput::DoWrite(const void* buf, size_t len)
{
    Underlying_.Write(buf, len);
}

void TFixedBufferFileOutput::DoFlush()
{
    Underlying_.Flush();
}

void TFixedBufferFileOutput::DoFinish()
{
    Underlying_.Finish();
}

////////////////////////////////////////////////////////////////////////////////

} // namespace NYT::NLogging