summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrew stalin <[email protected]>2025-01-27 14:40:58 +0700
committerGitHub <[email protected]>2025-01-27 14:40:58 +0700
commitd050a4a2d4247e31c7f807778237a7a394d1485c (patch)
tree2d904583d6d4292f50bcab5fd4a0ad19ea1ac784
parentf2d7def9144cc59522108736495e954b379c7df3 (diff)
no need to write an empty audit log entry (#13854)
-rw-r--r--ydb/core/audit/audit_log_impl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ydb/core/audit/audit_log_impl.cpp b/ydb/core/audit/audit_log_impl.cpp
index bfab6d72bef..d0ea379219c 100644
--- a/ydb/core/audit/audit_log_impl.cpp
+++ b/ydb/core/audit/audit_log_impl.cpp
@@ -179,7 +179,9 @@ private:
? AuditLogItemBuilders[builderIndex] : AuditLogItemBuilders[DefaultAuditLogItemBuilder];
const auto msg = ev->Get();
const auto auditLogItem = builder(msg->Time, msg->Parts);
- WriteLog(auditLogItem, logBackends.second);
+ if (!auditLogItem.empty()) {
+ WriteLog(auditLogItem, logBackends.second);
+ }
}
}