summaryrefslogtreecommitdiff
path: root/src/journal-remote
diff options
context:
space:
mode:
authorDaniel Braunwarth <daniel@braunwarth.dev>2022-09-22 18:35:19 +0200
committerDaniel Braunwarth <daniel@braunwarth.dev>2022-09-23 10:07:03 +0200
commit893bcd3d074022bd52618cb682152cb822878636 (patch)
treefd636b0ef90ba4d39163f92f1a3032a11237dcc8 /src/journal-remote
parent275e6be052e690adcad5d2a557acb9dcb5bedbc6 (diff)
downloadsystemd-893bcd3d074022bd52618cb682152cb822878636.tar.gz
shared/logs-show: add new --output= format "short-delta"
This new output formatting option is similar to "short-monotonic" but also shows the time delta between two messages. This fixes #24641.
Diffstat (limited to 'src/journal-remote')
-rw-r--r--src/journal-remote/journal-gatewayd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
index cdfeb1fc80..3e2a85ce29 100644
--- a/src/journal-remote/journal-gatewayd.c
+++ b/src/journal-remote/journal-gatewayd.c
@@ -148,6 +148,8 @@ static ssize_t request_reader_entries(
size_t max) {
RequestMeta *m = ASSERT_PTR(cls);
+ dual_timestamp previous_ts = DUAL_TIMESTAMP_NULL;
+ sd_id128_t previous_boot_id = SD_ID128_NULL;
int r;
size_t n, k;
@@ -222,7 +224,7 @@ static ssize_t request_reader_entries(
}
r = show_journal_entry(m->tmp, m->journal, m->mode, 0, OUTPUT_FULL_WIDTH,
- NULL, NULL, NULL);
+ NULL, NULL, NULL, &previous_ts, &previous_boot_id);
if (r < 0) {
log_error_errno(r, "Failed to serialize item: %m");
return MHD_CONTENT_READER_END_WITH_ERROR;