aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/logging
diff options
context:
space:
mode:
authorarkady-e1ppa <arkady-e1ppa@yandex-team.com>2024-06-11 09:52:09 +0300
committerarkady-e1ppa <arkady-e1ppa@yandex-team.com>2024-06-11 10:05:50 +0300
commit72cd1bd2a9b1c94a08343c8a8e21e6af4037ce28 (patch)
treea327f31aee0c020cbdac95eb19a78555a31f47a9 /library/cpp/yt/logging
parent37a673eee6d2ecdddf279adaf94970cdf2e25b6c (diff)
downloadydb-72cd1bd2a9b1c94a08343c8a8e21e6af4037ce28.tar.gz
More cosmetic issues
810902d6e6c3104880e1ab3b34d29a8aa4bec21b
Diffstat (limited to 'library/cpp/yt/logging')
-rw-r--r--library/cpp/yt/logging/logger.h2
-rw-r--r--library/cpp/yt/logging/static_analysis-inl.h28
-rw-r--r--library/cpp/yt/logging/static_analysis.h2
-rw-r--r--library/cpp/yt/logging/unittests/static_analysis_ut.cpp4
4 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/yt/logging/logger.h b/library/cpp/yt/logging/logger.h
index 5cbd681876..100b15a6e7 100644
--- a/library/cpp/yt/logging/logger.h
+++ b/library/cpp/yt/logging/logger.h
@@ -305,7 +305,7 @@ void LogStructuredEvent(
YT_LOG_EVENT_WITH_ANCHOR(logger, level, nullptr, __VA_ARGS__)
#if !defined(NDEBUG) && !defined(YT_DISABLE_FORMAT_STATIC_ANALYSIS)
- #define YT_LOG_CHECK_FORMAT(...) STATIC_ANALYSIS_CHECK_LOG_FORMAT(__VA_ARGS__)
+ #define YT_LOG_CHECK_FORMAT(...) YT_STATIC_ANALYSIS_CHECK_LOG_FORMAT(__VA_ARGS__)
#else
#define YT_LOG_CHECK_FORMAT(...)
#endif
diff --git a/library/cpp/yt/logging/static_analysis-inl.h b/library/cpp/yt/logging/static_analysis-inl.h
index 13cd425d58..353f7be38b 100644
--- a/library/cpp/yt/logging/static_analysis-inl.h
+++ b/library/cpp/yt/logging/static_analysis-inl.h
@@ -94,38 +94,38 @@ inline constexpr auto InvalidToken = std::monostate{};
//! Parameter pack parsing.
-#define STATIC_ANALYSIS_CAPTURE_TYPES(...) \
+#define YT_STATIC_ANALYSIS_CAPTURE_TYPES(...) \
decltype(::NYT::NLogging::NDetail::AsFormatArgs(__VA_ARGS__)){}
-#define STATIC_ANALYSIS_FIRST_TOKEN(...) \
+#define YT_STATIC_ANALYSIS_FIRST_TOKEN(...) \
PP_STRINGIZE( \
PP_VA_PICK_1_IMPL(__VA_ARGS__ __VA_OPT__(,) ::NYT::NLogging::NDetail::InvalidToken))
-#define STATIC_ANALYSIS_SECOND_TOKEN(...) \
+#define YT_STATIC_ANALYSIS_SECOND_TOKEN(...) \
PP_STRINGIZE(\
PP_VA_PICK_2_IMPL( \
__VA_ARGS__ __VA_OPT__(,) \
::NYT::NLogging::NDetail::InvalidToken, \
::NYT::NLogging::NDetail::InvalidToken))
-#define STATIC_ANALYSIS_FIRST_TOKEN_COND(...) \
- STATIC_ANALYSIS_FIRST_TOKEN(__VA_ARGS__)[0] == '\"'
+#define YT_STATIC_ANALYSIS_FIRST_TOKEN_COND(...) \
+ YT_STATIC_ANALYSIS_FIRST_TOKEN(__VA_ARGS__)[0] == '\"'
-#define STATIC_ANALYSIS_SECOND_TOKEN_COND(...) \
- STATIC_ANALYSIS_SECOND_TOKEN(__VA_ARGS__)[0] == '\"'
+#define YT_STATIC_ANALYSIS_SECOND_TOKEN_COND(...) \
+ YT_STATIC_ANALYSIS_SECOND_TOKEN(__VA_ARGS__)[0] == '\"'
-#undef STATIC_ANALYSIS_CHECK_LOG_FORMAT
-#define STATIC_ANALYSIS_CHECK_LOG_FORMAT(...) \
+#undef YT_STATIC_ANALYSIS_CHECK_LOG_FORMAT
+#define YT_STATIC_ANALYSIS_CHECK_LOG_FORMAT(...) \
::NYT \
::NLogging \
::NDetail \
::TAnalyserDispatcher< \
- STATIC_ANALYSIS_FIRST_TOKEN_COND(__VA_ARGS__), \
- STATIC_ANALYSIS_SECOND_TOKEN_COND(__VA_ARGS__) \
+ YT_STATIC_ANALYSIS_FIRST_TOKEN_COND(__VA_ARGS__), \
+ YT_STATIC_ANALYSIS_SECOND_TOKEN_COND(__VA_ARGS__) \
>::Do( \
- STATIC_ANALYSIS_FIRST_TOKEN(__VA_ARGS__), \
- STATIC_ANALYSIS_SECOND_TOKEN(__VA_ARGS__), \
- STATIC_ANALYSIS_CAPTURE_TYPES(__VA_ARGS__))
+ YT_STATIC_ANALYSIS_FIRST_TOKEN(__VA_ARGS__), \
+ YT_STATIC_ANALYSIS_SECOND_TOKEN(__VA_ARGS__), \
+ YT_STATIC_ANALYSIS_CAPTURE_TYPES(__VA_ARGS__))
////////////////////////////////////////////////////////////////////////////////
diff --git a/library/cpp/yt/logging/static_analysis.h b/library/cpp/yt/logging/static_analysis.h
index a335d8c6cc..4ccf5367d8 100644
--- a/library/cpp/yt/logging/static_analysis.h
+++ b/library/cpp/yt/logging/static_analysis.h
@@ -11,7 +11,7 @@ namespace NYT::NLogging {
// If format is not a string literal or argument list
// is not valid, no check is made -- macro turns to
// a no-op.
-#define STATIC_ANALYSIS_CHECK_LOG_FORMAT(...)
+#define YT_STATIC_ANALYSIS_CHECK_LOG_FORMAT(...)
////////////////////////////////////////////////////////////////////////////////
diff --git a/library/cpp/yt/logging/unittests/static_analysis_ut.cpp b/library/cpp/yt/logging/unittests/static_analysis_ut.cpp
index 1c705dc967..e1bef7aaa9 100644
--- a/library/cpp/yt/logging/unittests/static_analysis_ut.cpp
+++ b/library/cpp/yt/logging/unittests/static_analysis_ut.cpp
@@ -7,7 +7,7 @@ namespace {
////////////////////////////////////////////////////////////////////////////////
-TEST(TStaticAnalysis, ValidFormats)
+TEST(TStaticAnalysisTest, ValidFormats)
{
// Mock for actual error -- we only care that
// it is some runtime object.
@@ -25,7 +25,7 @@ TEST(TStaticAnalysis, ValidFormats)
}
// Uncomment this test to see that we don't have false negatives!
-// TEST(TStaticAnalysis, InvalidFormats)
+// TEST(TStaticAnalysisTest, InvalidFormats)
// {
// YT_LOG_CHECK_FORMAT("Hello", 1);
// YT_LOG_CHECK_FORMAT("Hello %");