aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/logger
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:23 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:23 +0300
commit706b83ed7de5a473436620367af31fc0ceecde07 (patch)
tree103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/logger
parent918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff)
downloadydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/logger')
-rw-r--r--library/cpp/logger/backend.cpp6
-rw-r--r--library/cpp/logger/element.cpp2
-rw-r--r--library/cpp/logger/element.h4
-rw-r--r--library/cpp/logger/element_ut.cpp4
-rw-r--r--library/cpp/logger/file.cpp10
-rw-r--r--library/cpp/logger/file.h2
-rw-r--r--library/cpp/logger/global/common.cpp2
-rw-r--r--library/cpp/logger/global/common.h4
-rw-r--r--library/cpp/logger/global/rty_formater.cpp4
-rw-r--r--library/cpp/logger/global/rty_formater.h4
-rw-r--r--library/cpp/logger/log.cpp6
-rw-r--r--library/cpp/logger/log_ut.cpp10
-rw-r--r--library/cpp/logger/null.cpp2
-rw-r--r--library/cpp/logger/stream.cpp2
-rw-r--r--library/cpp/logger/system.cpp2
-rw-r--r--library/cpp/logger/system.h4
-rw-r--r--library/cpp/logger/thread.cpp2
17 files changed, 35 insertions, 35 deletions
diff --git a/library/cpp/logger/backend.cpp b/library/cpp/logger/backend.cpp
index b26bf5e88c..405884960c 100644
--- a/library/cpp/logger/backend.cpp
+++ b/library/cpp/logger/backend.cpp
@@ -7,7 +7,7 @@
namespace {
class TGlobalLogsStorage {
private:
- TVector<TLogBackend*> Backends;
+ TVector<TLogBackend*> Backends;
TMutex Mutex;
public:
@@ -50,11 +50,11 @@ ELogPriority TLogBackend::FiltrationLevel() const {
return LOG_MAX_PRIORITY;
}
-TLogBackend::TLogBackend() noexcept {
+TLogBackend::TLogBackend() noexcept {
Singleton<TGlobalLogsStorage>()->Register(this);
}
-TLogBackend::~TLogBackend() {
+TLogBackend::~TLogBackend() {
Singleton<TGlobalLogsStorage>()->UnRegister(this);
}
diff --git a/library/cpp/logger/element.cpp b/library/cpp/logger/element.cpp
index b510fe16e1..7a3ea3228f 100644
--- a/library/cpp/logger/element.cpp
+++ b/library/cpp/logger/element.cpp
@@ -17,7 +17,7 @@ TLogElement::TLogElement(const TLog* parent, ELogPriority priority)
Reset();
}
-TLogElement::~TLogElement() {
+TLogElement::~TLogElement() {
try {
Finish();
} catch (...) {
diff --git a/library/cpp/logger/element.h b/library/cpp/logger/element.h
index fc9bff851f..f5d240d1ee 100644
--- a/library/cpp/logger/element.h
+++ b/library/cpp/logger/element.h
@@ -13,10 +13,10 @@ class TLogElement: public TTempBufOutput {
public:
TLogElement(const TLog* parent);
TLogElement(const TLog* parent, ELogPriority priority);
-
+
TLogElement(TLogElement&&) noexcept = default;
TLogElement& operator=(TLogElement&&) noexcept = default;
-
+
~TLogElement() override;
template <class T>
diff --git a/library/cpp/logger/element_ut.cpp b/library/cpp/logger/element_ut.cpp
index 32edc52dfb..bc6f1b4f0f 100644
--- a/library/cpp/logger/element_ut.cpp
+++ b/library/cpp/logger/element_ut.cpp
@@ -2,7 +2,7 @@
#include "element.h"
#include "stream.h"
-#include <util/generic/string.h>
+#include <util/generic/string.h>
#include <util/stream/str.h>
#include <util/generic/ptr.h>
#include <utility>
@@ -26,7 +26,7 @@ void TLogElementTest::TestMoveCtor() {
THolder<TLogElement> src = MakeHolder<TLogElement>(&log);
- TString message = "Hello, World!";
+ TString message = "Hello, World!";
(*src) << message;
THolder<TLogElement> dst = MakeHolder<TLogElement>(std::move(*src));
diff --git a/library/cpp/logger/file.cpp b/library/cpp/logger/file.cpp
index 15a4946eda..650be581ec 100644
--- a/library/cpp/logger/file.cpp
+++ b/library/cpp/logger/file.cpp
@@ -3,14 +3,14 @@
#include <util/system/file.h>
#include <util/system/rwlock.h>
-#include <util/generic/string.h>
+#include <util/generic/string.h>
/*
* file log
*/
class TFileLogBackend::TImpl {
public:
- inline TImpl(const TString& path)
+ inline TImpl(const TString& path)
: File_(OpenFile(path))
{
}
@@ -30,7 +30,7 @@ public:
}
private:
- static inline TFile OpenFile(const TString& path) {
+ static inline TFile OpenFile(const TString& path) {
return TFile(path, OpenAlways | WrOnly | ForAppend | Seq | NoReuse);
}
@@ -39,12 +39,12 @@ private:
TFile File_;
};
-TFileLogBackend::TFileLogBackend(const TString& path)
+TFileLogBackend::TFileLogBackend(const TString& path)
: Impl_(new TImpl(path))
{
}
-TFileLogBackend::~TFileLogBackend() {
+TFileLogBackend::~TFileLogBackend() {
}
void TFileLogBackend::WriteData(const TLogRecord& rec) {
diff --git a/library/cpp/logger/file.h b/library/cpp/logger/file.h
index 10b4cd0c20..ce6561898f 100644
--- a/library/cpp/logger/file.h
+++ b/library/cpp/logger/file.h
@@ -7,7 +7,7 @@
class TFileLogBackend: public TLogBackend {
public:
- TFileLogBackend(const TString& path);
+ TFileLogBackend(const TString& path);
~TFileLogBackend() override;
void WriteData(const TLogRecord& rec) override;
diff --git a/library/cpp/logger/global/common.cpp b/library/cpp/logger/global/common.cpp
index 4fb05c19b4..1b64867546 100644
--- a/library/cpp/logger/global/common.cpp
+++ b/library/cpp/logger/global/common.cpp
@@ -3,7 +3,7 @@
#include <util/generic/yexception.h>
namespace NLoggingImpl {
- TString GetLocalTimeSSimple() {
+ TString GetLocalTimeSSimple() {
struct tm tm;
return Strftime("%b%d_%H%M%S", Now().LocalTime(&tm));
}
diff --git a/library/cpp/logger/global/common.h b/library/cpp/logger/global/common.h
index 7dcf650dec..364097d1bc 100644
--- a/library/cpp/logger/global/common.h
+++ b/library/cpp/logger/global/common.h
@@ -4,7 +4,7 @@
#include <util/folder/path.h>
#include <util/generic/singleton.h>
-#include <util/generic/string.h>
+#include <util/generic/string.h>
#include <util/generic/ptr.h>
#include <util/generic/yexception.h>
#include <util/string/printf.h>
@@ -66,7 +66,7 @@ public:
namespace NLoggingImpl {
- TString GetLocalTimeSSimple();
+ TString GetLocalTimeSSimple();
// Returns correct log type to use
TString PrepareToOpenLog(TString logType, int logLevel, bool rotation, bool startAsDaemon);
diff --git a/library/cpp/logger/global/rty_formater.cpp b/library/cpp/logger/global/rty_formater.cpp
index 305f8470c5..5721733860 100644
--- a/library/cpp/logger/global/rty_formater.cpp
+++ b/library/cpp/logger/global/rty_formater.cpp
@@ -52,12 +52,12 @@ namespace NLoggingImpl {
return string.RNextTok(LOCSLASH_C);
}
- TString GetSystemResources() {
+ TString GetSystemResources() {
NMemInfo::TMemInfo mi = NMemInfo::GetMemInfo();
return PrintSystemResources(mi);
}
- TString PrintSystemResources(const NMemInfo::TMemInfo& mi) {
+ TString PrintSystemResources(const NMemInfo::TMemInfo& mi) {
return Sprintf(" rss=%0.3fMb, vms=%0.3fMb", mi.RSS * 1.0 / (1024 * 1024), mi.VMS * 1.0 / (1024 * 1024));
}
}
diff --git a/library/cpp/logger/global/rty_formater.h b/library/cpp/logger/global/rty_formater.h
index 6532e1d769..471a050598 100644
--- a/library/cpp/logger/global/rty_formater.h
+++ b/library/cpp/logger/global/rty_formater.h
@@ -40,8 +40,8 @@ namespace NLoggingImpl {
return TLocalTimeS();
}
- TString GetSystemResources();
- TString PrintSystemResources(const NMemInfo::TMemInfo& info);
+ TString GetSystemResources();
+ TString PrintSystemResources(const NMemInfo::TMemInfo& info);
struct TLoggerFormatterTraits {
static ILoggerFormatter* CreateDefault() {
diff --git a/library/cpp/logger/log.cpp b/library/cpp/logger/log.cpp
index e1d70cc3d2..2f5fc33356 100644
--- a/library/cpp/logger/log.cpp
+++ b/library/cpp/logger/log.cpp
@@ -8,7 +8,7 @@
#include <util/string/cast.h>
#include <util/stream/printf.h>
#include <util/system/yassert.h>
-#include <util/generic/string.h>
+#include <util/generic/string.h>
#include <util/generic/scope.h>
#include <util/generic/yexception.h>
@@ -146,7 +146,7 @@ TLog::~TLog() = default;
TLog& TLog::operator=(const TLog&) = default;
TLog& TLog::operator=(TLog&&) = default;
-bool TLog::IsOpen() const noexcept {
+bool TLog::IsOpen() const noexcept {
return Impl_->IsOpen();
}
@@ -218,7 +218,7 @@ void TLog::ResetBackend(THolder<TLogBackend> backend) noexcept {
Impl_->ResetBackend(std::move(backend));
}
-bool TLog::IsNullLog() const noexcept {
+bool TLog::IsNullLog() const noexcept {
return Impl_->IsNullLog();
}
diff --git a/library/cpp/logger/log_ut.cpp b/library/cpp/logger/log_ut.cpp
index 8de46f17f5..a46bf5c7b3 100644
--- a/library/cpp/logger/log_ut.cpp
+++ b/library/cpp/logger/log_ut.cpp
@@ -7,7 +7,7 @@
#include <util/system/yield.h>
#include <util/memory/blob.h>
#include <util/stream/file.h>
-#include <util/generic/string.h>
+#include <util/generic/string.h>
#include <util/generic/vector.h>
class TLogTest: public TTestBase {
@@ -56,7 +56,7 @@ void TLogTest::TestFile() {
TBlob data = TBlob::FromFileSingleThreaded(LOGFILE);
- UNIT_ASSERT_EQUAL(TString((const char*)data.Begin(), data.Size()), "some useful data 12, 34, 3.000000, qwqwqw\n");
+ UNIT_ASSERT_EQUAL(TString((const char*)data.Begin(), data.Size()), "some useful data 12, 34, 3.000000, qwqwqw\n");
}
void TLogTest::TestThreaded() {
@@ -75,7 +75,7 @@ void TLogTest::TestThreaded() {
TBlob data = TBlob::FromFileSingleThreaded(LOGFILE);
- UNIT_ASSERT_EQUAL(TString((const char*)data.Begin(), data.Size()), "some useful data 12, 34, 3.000000, qwqwqw\n");
+ UNIT_ASSERT_EQUAL(TString((const char*)data.Begin(), data.Size()), "some useful data 12, 34, 3.000000, qwqwqw\n");
}
void TLogTest::TestThreadedWithOverflow() {
@@ -166,13 +166,13 @@ void TLogTest::TestFormat() {
void TLogTest::TestWrite() {
TStringStream data;
- TString test;
+ TString test;
{
TLog log(THolder(new TStreamLogBackend(&data)));
for (size_t i = 0; i < 1000; ++i) {
- TVector<char> buf(i, (char)i);
+ TVector<char> buf(i, (char)i);
test.append(buf.data(), buf.size());
log.Write(buf.data(), buf.size());
diff --git a/library/cpp/logger/null.cpp b/library/cpp/logger/null.cpp
index debb22f794..2ec47aed53 100644
--- a/library/cpp/logger/null.cpp
+++ b/library/cpp/logger/null.cpp
@@ -3,7 +3,7 @@
TNullLogBackend::TNullLogBackend() {
}
-TNullLogBackend::~TNullLogBackend() {
+TNullLogBackend::~TNullLogBackend() {
}
void TNullLogBackend::WriteData(const TLogRecord&) {
diff --git a/library/cpp/logger/stream.cpp b/library/cpp/logger/stream.cpp
index 96787ad94b..c1bb222ff7 100644
--- a/library/cpp/logger/stream.cpp
+++ b/library/cpp/logger/stream.cpp
@@ -8,7 +8,7 @@ TStreamLogBackend::TStreamLogBackend(IOutputStream* slave)
{
}
-TStreamLogBackend::~TStreamLogBackend() {
+TStreamLogBackend::~TStreamLogBackend() {
}
void TStreamLogBackend::WriteData(const TLogRecord& rec) {
diff --git a/library/cpp/logger/system.cpp b/library/cpp/logger/system.cpp
index 42233f63d2..0e9a647d28 100644
--- a/library/cpp/logger/system.cpp
+++ b/library/cpp/logger/system.cpp
@@ -46,7 +46,7 @@ TSysLogBackend::TSysLogBackend(const char* ident, EFacility facility, int flags)
#endif
}
-TSysLogBackend::~TSysLogBackend() {
+TSysLogBackend::~TSysLogBackend() {
#if defined(_unix_)
closelog();
#endif
diff --git a/library/cpp/logger/system.h b/library/cpp/logger/system.h
index b8c60b3023..471dee3ac1 100644
--- a/library/cpp/logger/system.h
+++ b/library/cpp/logger/system.h
@@ -39,7 +39,7 @@ public:
void WriteData(const TLogRecord& rec) override;
void ReopenLog() override;
- virtual TString GetIdent() const {
+ virtual TString GetIdent() const {
return Ident;
}
@@ -54,7 +54,7 @@ public:
protected:
int ELogPriority2SyslogPriority(ELogPriority priority);
- TString Ident;
+ TString Ident;
EFacility Facility;
int Flags;
};
diff --git a/library/cpp/logger/thread.cpp b/library/cpp/logger/thread.cpp
index 0ccf9e374b..7ff8f86463 100644
--- a/library/cpp/logger/thread.cpp
+++ b/library/cpp/logger/thread.cpp
@@ -126,7 +126,7 @@ TThreadedLogBackend::TThreadedLogBackend(TLogBackend* slave, size_t queuelen, st
{
}
-TThreadedLogBackend::~TThreadedLogBackend() {
+TThreadedLogBackend::~TThreadedLogBackend() {
}
void TThreadedLogBackend::WriteData(const TLogRecord& rec) {