aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/logger/stream_creator.cpp
blob: 6246f9bf9cb737d47742a86eaaa83bd14dabb301 (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_creator.h"
#include "stream.h"

THolder<TLogBackend> TCerrLogBackendCreator::DoCreateLogBackend() const {
    return MakeHolder<TStreamLogBackend>(&Cerr);
}


TCerrLogBackendCreator::TCerrLogBackendCreator()
    : TLogBackendCreatorBase("cerr")
{}

void TCerrLogBackendCreator::DoToJson(NJson::TJsonValue& /*value*/) const {
}

ILogBackendCreator::TFactory::TRegistrator<TCerrLogBackendCreator> TCerrLogBackendCreator::RegistrarCerr("cerr");
ILogBackendCreator::TFactory::TRegistrator<TCerrLogBackendCreator> TCerrLogBackendCreator::RegistrarConsole("console");


THolder<TLogBackend> TCoutLogBackendCreator::DoCreateLogBackend() const {
    return MakeHolder<TStreamLogBackend>(&Cout);
}


TCoutLogBackendCreator::TCoutLogBackendCreator()
    : TLogBackendCreatorBase("cout")
{}

ILogBackendCreator::TFactory::TRegistrator<TCoutLogBackendCreator> TCoutLogBackendCreator::Registrar("cout");

void TCoutLogBackendCreator::DoToJson(NJson::TJsonValue& /*value*/) const {
}