aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/logger/log.cpp
diff options
context:
space:
mode:
authorstanly <stanly@yandex-team.ru>2022-02-10 16:46:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:49 +0300
commitcde218e65dfef5ce03a48d641fd8f7913cf17b2d (patch)
treed3349caea4095825a55b5ba24fe758067b29ce6f /library/cpp/logger/log.cpp
parent9f813499b4ef585cb3c2bb93de93ef003daf4fc4 (diff)
downloadydb-cde218e65dfef5ce03a48d641fd8f7913cf17b2d.tar.gz
Restoring authorship annotation for <stanly@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/logger/log.cpp')
-rw-r--r--library/cpp/logger/log.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/logger/log.cpp b/library/cpp/logger/log.cpp
index e1d70cc3d2..57e1b16475 100644
--- a/library/cpp/logger/log.cpp
+++ b/library/cpp/logger/log.cpp
@@ -12,17 +12,17 @@
#include <util/generic/scope.h>
#include <util/generic/yexception.h>
-THolder<TLogBackend> CreateLogBackend(const TString& fname, ELogPriority priority, bool threaded) {
+THolder<TLogBackend> CreateLogBackend(const TString& fname, ELogPriority priority, bool threaded) {
TLogBackendCreatorUninitialized creator;
creator.InitCustom(fname, priority, threaded);
return creator.CreateLogBackend();
}
-THolder<TLogBackend> CreateFilteredOwningThreadedLogBackend(const TString& fname, ELogPriority priority, size_t queueLen) {
+THolder<TLogBackend> CreateFilteredOwningThreadedLogBackend(const TString& fname, ELogPriority priority, size_t queueLen) {
return MakeHolder<TFilteredLogBackend>(CreateOwningThreadedLogBackend(fname, queueLen), priority);
}
-THolder<TOwningThreadedLogBackend> CreateOwningThreadedLogBackend(const TString& fname, size_t queueLen) {
+THolder<TOwningThreadedLogBackend> CreateOwningThreadedLogBackend(const TString& fname, size_t queueLen) {
return MakeHolder<TOwningThreadedLogBackend>(CreateLogBackend(fname, LOG_MAX_PRIORITY, false).Release(), queueLen);
}
@@ -45,7 +45,7 @@ class TLog::TImpl: public TAtomicRefCount<TImpl> {
};
public:
- inline TImpl(THolder<TLogBackend> backend)
+ inline TImpl(THolder<TLogBackend> backend)
: Backend_(std::move(backend))
{
}
@@ -76,11 +76,11 @@ public:
Printf(ls, format, args);
}
- inline void ResetBackend(THolder<TLogBackend> backend) noexcept {
+ inline void ResetBackend(THolder<TLogBackend> backend) noexcept {
Backend_ = std::move(backend);
}
- inline THolder<TLogBackend> ReleaseBackend() noexcept {
+ inline THolder<TLogBackend> ReleaseBackend() noexcept {
return std::move(Backend_);
}
@@ -135,7 +135,7 @@ TLog::TLog(const TString& fname, ELogPriority priority)
{
}
-TLog::TLog(THolder<TLogBackend> backend)
+TLog::TLog(THolder<TLogBackend> backend)
: Impl_(MakeIntrusive<TImpl>(std::move(backend)))
{
}
@@ -214,15 +214,15 @@ bool TLog::OpenLog(const char* path, ELogPriority lp) {
return true;
}
-void TLog::ResetBackend(THolder<TLogBackend> backend) noexcept {
- Impl_->ResetBackend(std::move(backend));
+void TLog::ResetBackend(THolder<TLogBackend> backend) noexcept {
+ Impl_->ResetBackend(std::move(backend));
}
bool TLog::IsNullLog() const noexcept {
return Impl_->IsNullLog();
}
-THolder<TLogBackend> TLog::ReleaseBackend() noexcept {
+THolder<TLogBackend> TLog::ReleaseBackend() noexcept {
return Impl_->ReleaseBackend();
}
@@ -235,10 +235,10 @@ void TLog::Write(ELogPriority priority, const char* data, size_t len) const {
}
}
-void TLog::Write(ELogPriority priority, const TStringBuf data) const {
- Write(priority, data.data(), data.size());
-}
-
+void TLog::Write(ELogPriority priority, const TStringBuf data) const {
+ Write(priority, data.data(), data.size());
+}
+
void TLog::Write(const char* data, size_t len) const {
Write(Impl_->DefaultPriority(), data, len);
}