journalctl: add remote log dir to search path when --merge is passed#4970
journalctl: add remote log dir to search path when --merge is passed#4970poettering merged 1 commit intosystemd:masterfrom
Conversation
| NULSTR_FOREACH(p, search_paths) | ||
| (void) add_root_directory(j, p, true); | ||
|
|
||
| if (!j->flags & SD_JOURNAL_LOCAL_ONLY) |
There was a problem hiding this comment.
this doesn't look right. you are using a boolean negation of the flags field. I figure you mean:
if (!(j->flags & SD_JOURNAL_LOCAL_ONLY))Other than that I think the patch looks OK
The journalctl man page says: "-m, --merge Show entries interleaved from all available journals, including remote ones.", but current version of journalctl doesn't live up to this promise. This patch simply adds "/var/log/journal/remote" to search path if --merge flag is used. Should fix issue systemd#3618
9d666fc to
1821ee3
Compare
|
Thanks for quick review. I force pushed the fix. |
|
lgtm |
|
@mbachry @poettering This pull request added On the other hand, I just found the following comment elsewhere in the same file: |
The journalctl man page says: "-m, --merge Show entries interleaved from all available journals, including remote ones.", but current version of journalctl doesn't live up to this promise. This patch simply adds
/var/log/journal/remoteto search path if--merge flagis used.Should fix issue #3618