diff options
author | ilnurkh <ilnurkh@yandex-team.com> | 2023-10-09 23:39:40 +0300 |
---|---|---|
committer | ilnurkh <ilnurkh@yandex-team.com> | 2023-10-09 23:57:14 +0300 |
commit | e601ca03f859335d57ecff2e5aa6af234b6052ed (patch) | |
tree | de519a847e58a1b3993fcbfe05ff44cc946a3e24 /library/cpp/logger | |
parent | bbf2b6878af3854815a2c0ecb07a687071787639 (diff) | |
download | ydb-e601ca03f859335d57ecff2e5aa6af234b6052ed.tar.gz |
Y_VERIFY->Y_ABORT_UNLESS at ^l
https://clubs.at.yandex-team.ru/arcadia/29404
Diffstat (limited to 'library/cpp/logger')
-rw-r--r-- | library/cpp/logger/global/global.h | 2 | ||||
-rw-r--r-- | library/cpp/logger/global/rty_formater.cpp | 4 | ||||
-rw-r--r-- | library/cpp/logger/uninitialized_creator.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/logger/global/global.h b/library/cpp/logger/global/global.h index cbe71b16ea..dece990083 100644 --- a/library/cpp/logger/global/global.h +++ b/library/cpp/logger/global/global.h @@ -81,7 +81,7 @@ public: do { \ if (Y_UNLIKELY(!(expr))) { \ FATAL_LOG << Sprintf(msg, ##__VA_ARGS__) << Endl; \ - Y_VERIFY(false, msg, ##__VA_ARGS__); \ + Y_ABORT_UNLESS(false, msg, ##__VA_ARGS__); \ }; \ } while (0); diff --git a/library/cpp/logger/global/rty_formater.cpp b/library/cpp/logger/global/rty_formater.cpp index 305f8470c5..66657e7162 100644 --- a/library/cpp/logger/global/rty_formater.cpp +++ b/library/cpp/logger/global/rty_formater.cpp @@ -12,7 +12,7 @@ namespace { constexpr size_t LocalTimeSBufferSize = sizeof("2017-07-24 12:20:34.313 +0300"); size_t PrintLocalTimeS(const TInstant instant, char* const begin, const char* const end) { - Y_VERIFY(static_cast<size_t>(end - begin) >= LocalTimeSBufferSize); + Y_ABORT_UNLESS(static_cast<size_t>(end - begin) >= LocalTimeSBufferSize); struct tm tm; instant.LocalTime(&tm); @@ -22,7 +22,7 @@ namespace { pos += strftime(pos, end - pos, "%Y-%m-%d %H:%M:%S.", &tm); pos += sprintf(pos, "%03" PRIu32, instant.MilliSecondsOfSecond()); pos += strftime(pos, end - pos, " %z", &tm); - Y_VERIFY(LocalTimeSBufferSize - 1 == pos - begin); // together with Y_VERIFY above this also implies pos<=end + Y_ABORT_UNLESS(LocalTimeSBufferSize - 1 == pos - begin); // together with Y_VERIFY above this also implies pos<=end return (pos - begin); } } diff --git a/library/cpp/logger/uninitialized_creator.cpp b/library/cpp/logger/uninitialized_creator.cpp index 26dd168529..748127356e 100644 --- a/library/cpp/logger/uninitialized_creator.cpp +++ b/library/cpp/logger/uninitialized_creator.cpp @@ -43,7 +43,7 @@ bool TLogBackendCreatorUninitialized::Init(const IInitContext& ctx) { void TLogBackendCreatorUninitialized::ToJson(NJson::TJsonValue& value) const { - Y_VERIFY(Slave, "Serialization off uninitialized LogBackendCreator"); + Y_ABORT_UNLESS(Slave, "Serialization off uninitialized LogBackendCreator"); Slave->ToJson(value); } |