summaryrefslogtreecommitdiffstats
path: root/library/cpp/logger
diff options
context:
space:
mode:
authortrofimenkov <[email protected]>2022-02-10 16:49:31 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:49:31 +0300
commit7c6139b61ced2798d1134b68b8facf6925a36b8e (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/logger
parent30cebc2cfa79af3b577760a113e203a79450e6b6 (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/logger')
-rw-r--r--library/cpp/logger/element.cpp10
-rw-r--r--library/cpp/logger/element_ut.cpp64
-rw-r--r--library/cpp/logger/thread.cpp2
-rw-r--r--library/cpp/logger/ut/ya.make2
4 files changed, 39 insertions, 39 deletions
diff --git a/library/cpp/logger/element.cpp b/library/cpp/logger/element.cpp
index e39b4607bf7..b510fe16e11 100644
--- a/library/cpp/logger/element.cpp
+++ b/library/cpp/logger/element.cpp
@@ -2,7 +2,7 @@
#include "element.h"
#include <utility>
-
+
TLogElement::TLogElement(const TLog* parent)
: Parent_(parent)
, Priority_(Parent_->DefaultPriority())
@@ -25,10 +25,10 @@ TLogElement::~TLogElement() {
}
void TLogElement::DoFlush() {
- if (IsNull()) {
- return;
- }
-
+ if (IsNull()) {
+ return;
+ }
+
const size_t filled = Filled();
if (filled) {
diff --git a/library/cpp/logger/element_ut.cpp b/library/cpp/logger/element_ut.cpp
index fa7fa835bf7..32edc52dfb0 100644
--- a/library/cpp/logger/element_ut.cpp
+++ b/library/cpp/logger/element_ut.cpp
@@ -1,39 +1,39 @@
-#include "log.h"
-#include "element.h"
-#include "stream.h"
-
+#include "log.h"
+#include "element.h"
+#include "stream.h"
+
#include <util/generic/string.h>
-#include <util/stream/str.h>
-#include <util/generic/ptr.h>
+#include <util/stream/str.h>
+#include <util/generic/ptr.h>
#include <utility>
-
+
#include <library/cpp/testing/unittest/registar.h>
-
-class TLogElementTest: public TTestBase {
- UNIT_TEST_SUITE(TLogElementTest);
- UNIT_TEST(TestMoveCtor);
- UNIT_TEST_SUITE_END();
-
-public:
- void TestMoveCtor();
-};
-
-UNIT_TEST_SUITE_REGISTRATION(TLogElementTest);
-
-void TLogElementTest::TestMoveCtor() {
- TStringStream output;
+
+class TLogElementTest: public TTestBase {
+ UNIT_TEST_SUITE(TLogElementTest);
+ UNIT_TEST(TestMoveCtor);
+ UNIT_TEST_SUITE_END();
+
+public:
+ void TestMoveCtor();
+};
+
+UNIT_TEST_SUITE_REGISTRATION(TLogElementTest);
+
+void TLogElementTest::TestMoveCtor() {
+ TStringStream output;
TLog log(MakeHolder<TStreamLogBackend>(&output));
-
+
THolder<TLogElement> src = MakeHolder<TLogElement>(&log);
-
+
TString message = "Hello, World!";
- (*src) << message;
-
+ (*src) << message;
+
THolder<TLogElement> dst = MakeHolder<TLogElement>(std::move(*src));
-
- src.Destroy();
- UNIT_ASSERT(output.Str() == "");
-
- dst.Destroy();
- UNIT_ASSERT(output.Str() == message);
-}
+
+ src.Destroy();
+ UNIT_ASSERT(output.Str() == "");
+
+ dst.Destroy();
+ UNIT_ASSERT(output.Str() == message);
+}
diff --git a/library/cpp/logger/thread.cpp b/library/cpp/logger/thread.cpp
index afda2404f56..0ccf9e374be 100644
--- a/library/cpp/logger/thread.cpp
+++ b/library/cpp/logger/thread.cpp
@@ -112,7 +112,7 @@ public:
private:
TLogBackend* Slave_;
- TThreadPool Queue_{"ThreadedLogBack"};
+ TThreadPool Queue_{"ThreadedLogBack"};
const std::function<void()> QueueOverflowCallback_;
};
diff --git a/library/cpp/logger/ut/ya.make b/library/cpp/logger/ut/ya.make
index 3e990ab8d26..2a461c13539 100644
--- a/library/cpp/logger/ut/ya.make
+++ b/library/cpp/logger/ut/ya.make
@@ -12,7 +12,7 @@ SRCDIR(library/cpp/logger)
SRCS(
log_ut.cpp
- element_ut.cpp
+ element_ut.cpp
rotating_file_ut.cpp
composite_ut.cpp
)