aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorazevaykin <azevaykin@yandex-team.com>2023-11-01 09:01:58 +0300
committerazevaykin <azevaykin@yandex-team.com>2023-11-01 09:33:40 +0300
commita932c9ba0041a678a2a52524d39510f8bca468c9 (patch)
tree5a64b8a73677f148a7bdb819622be119809f5d1f /library/cpp
parentb20aa0ca2385dad33e357649643a944c2f678557 (diff)
downloadydb-a932c9ba0041a678a2a52524d39510f8bca468c9.tar.gz
Throttle datashard log messages
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/actors/core/log.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/cpp/actors/core/log.h b/library/cpp/actors/core/log.h
index 05e7a50107..a07540dc49 100644
--- a/library/cpp/actors/core/log.h
+++ b/library/cpp/actors/core/log.h
@@ -123,6 +123,13 @@
} \
} while (0) /**/
+#define LOG_LOG_S_THROTTLE(throttler, actorCtxOrSystem, priority, component, stream) \
+ do { \
+ if ((throttler).Kick()) { \
+ LOG_LOG_S(actorCtxOrSystem, priority, component, stream); \
+ } \
+ } while (0) /**/
+
#define TRACE_EVENT(component) \
const auto& currentTracer = component; \
if (ev->HasEvent()) { \