/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
library/cpp/logger/element.cpp
39 строк
635 B
qkrorlqr
Initial NBS OpenSource export
28 апр 2023, 21:54
28 апр 2023, 21:54
783a858
Код
Авторство
О чём код?
#include "log.h" #include "element.h" #include <utility> TLogElement::TLogElement(const TLog* parent) : Parent_(parent) , Priority_(Parent_->DefaultPriority()) { Reset(); } TLogElement::TLogElement(const TLog* parent, ELogPriority priority) : Parent_(parent) , Priority_(priority) { Reset(); } TLogElement::~TLogElement() { try { Finish(); } catch (...) { } } void TLogElement::DoFlush() { if (IsNull()) { return; } const size_t filled = Filled(); if (filled) { Parent_->Write(Priority_, Data(), filled, std::move(Context_)); Reset(); } }