summaryrefslogtreecommitdiff
path: root/src/journal/journald-native.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2022-11-17 10:25:06 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-11-17 22:16:18 +0900
commitf9fbac8b1fa23392f8ff8f2d8284676ed72f0138 (patch)
treed7bde254174a7bc96a79ca9589b96d73122ee1c2 /src/journal/journald-native.c
parent305dd91adfde332e7e5c1b2470edb32774f9a032 (diff)
downloadsystemd-f9fbac8b1fa23392f8ff8f2d8284676ed72f0138.tar.gz
log: Remove log_ratelimit_debug() macros
These don't make sense anymore since we disable log ratelimiting when logging at debug level.
Diffstat (limited to 'src/journal/journald-native.c')
-rw-r--r--src/journal/journald-native.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
index 1d2cb0b71a..21e20db2d4 100644
--- a/src/journal/journald-native.c
+++ b/src/journal/journald-native.c
@@ -122,8 +122,7 @@ static int server_process_entry(
if (!e) {
/* Trailing noise, let's ignore it, and flush what we collected */
- log_ratelimit_debug(JOURNALD_LOG_RATELIMIT,
- "Received message with trailing noise, ignoring.");
+ log_debug("Received message with trailing noise, ignoring.");
break; /* finish processing of the message */
}
@@ -142,8 +141,7 @@ static int server_process_entry(
/* A property follows */
if (n > ENTRY_FIELD_COUNT_MAX) {
- log_ratelimit_debug(JOURNALD_LOG_RATELIMIT,
- "Received an entry that has more than " STRINGIFY(ENTRY_FIELD_COUNT_MAX) " fields, ignoring entry.");
+ log_debug("Received an entry that has more than " STRINGIFY(ENTRY_FIELD_COUNT_MAX) " fields, ignoring entry.");
goto finish;
}
@@ -163,15 +161,13 @@ static int server_process_entry(
l = e - p;
if (l > DATA_SIZE_MAX) {
- log_ratelimit_debug(JOURNALD_LOG_RATELIMIT,
- "Received text block of %zu bytes is too large, ignoring entry.", l);
+ log_debug("Received text block of %zu bytes is too large, ignoring entry.", l);
goto finish;
}
if (entry_size + l + n + 1 > ENTRY_SIZE_MAX) { /* data + separators + trailer */
- log_ratelimit_debug(JOURNALD_LOG_RATELIMIT,
- "Entry is too big (%zu bytes after processing %zu entries), ignoring entry.",
- entry_size + l, n + 1);
+ log_debug("Entry is too big (%zu bytes after processing %zu entries), ignoring entry.",
+ entry_size + l, n + 1);
goto finish;
}
@@ -195,31 +191,26 @@ static int server_process_entry(
char *k;
if (*remaining < e - p + 1 + sizeof(uint64_t) + 1) {
- log_ratelimit_debug(JOURNALD_LOG_RATELIMIT,
- "Failed to parse message, ignoring.");
+ log_debug("Failed to parse message, ignoring.");
break;
}
l = unaligned_read_le64(e + 1);
if (l > DATA_SIZE_MAX) {
- log_ratelimit_debug(JOURNALD_LOG_RATELIMIT,
- "Received binary data block of %"PRIu64" bytes is too large, ignoring entry.",
- l);
+ log_debug("Received binary data block of %"PRIu64" bytes is too large, ignoring entry.", l);
goto finish;
}
total = (e - p) + 1 + l;
if (entry_size + total + n + 1 > ENTRY_SIZE_MAX) { /* data + separators + trailer */
- log_ratelimit_debug(JOURNALD_LOG_RATELIMIT,
- "Entry is too big (%"PRIu64"bytes after processing %zu fields), ignoring.",
- entry_size + total, n + 1);
+ log_debug("Entry is too big (%"PRIu64"bytes after processing %zu fields), ignoring.",
+ entry_size + total, n + 1);
goto finish;
}
if ((uint64_t) *remaining < e - p + 1 + sizeof(uint64_t) + l + 1 ||
e[1+sizeof(uint64_t)+l] != '\n') {
- log_ratelimit_debug(JOURNALD_LOG_RATELIMIT,
- "Failed to parse message, ignoring.");
+ log_debug("Failed to parse message, ignoring.");
break;
}
@@ -259,9 +250,7 @@ static int server_process_entry(
entry_size += STRLEN("_TRANSPORT=journal");
if (entry_size + n + 1 > ENTRY_SIZE_MAX) { /* data + separators + trailer */
- log_ratelimit_debug(JOURNALD_LOG_RATELIMIT,
- "Entry is too big with %zu properties and %zu bytes, ignoring.",
- n, entry_size);
+ log_debug("Entry is too big with %zu properties and %zu bytes, ignoring.", n, entry_size);
goto finish;
}