Skip to content

journalctl: show duplicate entries if they are from the same file (#14898) - #14913

Merged
keszybz merged 1 commit into
systemd:masterfrom
georgmu:journalctl-duplicate-lines
Mar 11, 2020
Merged

keszybz merged 1 commit into
systemd:masterfrom
georgmu:journalctl-duplicate-lines

Conversation

@georgmu

@georgmu georgmu commented Feb 20, 2020

Copy link
Copy Markdown
Contributor

When having a service which intentionally outputs multiple equal lines,
all these messages might be inserted with the same timestamp.

journalctl has a mechanism to avoid duplicate lines, which might be in
different journal files.

This patch allows duplicate lines, if they are from the same file.

…4898)

When having a service which intentionally outputs multiple equal lines,
all these messages might be inserted with the same timestamp.

journalctl has a mechanism to avoid duplicate lines, which might be in
different journal files.

This patch allows duplicate lines, if they are from the same file.
@georgmu

georgmu commented Feb 21, 2020

Copy link
Copy Markdown
Contributor Author

A quick command to test the difference is

systemd-cat echo -e "line\nline"

@georgmu
georgmu requested a review from poettering February 21, 2020 08:47
@yuwata yuwata added the journal label Feb 25, 2020
@keszybz

keszybz commented Mar 11, 2020

Copy link
Copy Markdown
Member

LGTM.

@keszybz
keszybz merged commit b684904 into systemd:master Mar 11, 2020
yuwata pushed a commit that referenced this pull request Mar 13, 2020
This regression was introduced in #14913.

The current_file variable can be NULL, as, for example, with the
following commands:

* journalctl --list-boots
* journalctl -b -1 --no-pager

Since current_file is only checked for pointer equality with f, removing
the assertion is safe here.
@georgmu
georgmu deleted the journalctl-duplicate-lines branch March 13, 2020 07:28
eworm-de pushed a commit to eworm-de/systemd that referenced this pull request Jun 23, 2020
This regression was introduced in systemd#14913.

The current_file variable can be NULL, as, for example, with the
following commands:

* journalctl --list-boots
* journalctl -b -1 --no-pager

Since current_file is only checked for pointer equality with f, removing
the assertion is safe here.

(cherry picked from commit 8d0726f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants