journalctl: add --output-fields= (#7181)
This option allows restricting the shown fields in the output modes that would normally show all fields. It allows clients that are only interested in a subset of the fields to access those more efficiently. Also, it makes the resulting size of the output more predictable. It has no effect on the various `short` output modes, because those already only show a subset of the fields.
This commit is contained in:
committed by
Yu Watanabe
parent
a8caf8b251
commit
cc25a67e2a
@@ -225,7 +225,7 @@ static ssize_t request_reader_entries(
|
||||
return MHD_CONTENT_READER_END_WITH_ERROR;
|
||||
}
|
||||
|
||||
r = output_journal(m->tmp, m->journal, m->mode, 0, OUTPUT_FULL_WIDTH, NULL);
|
||||
r = output_journal(m->tmp, m->journal, m->mode, 0, OUTPUT_FULL_WIDTH, NULL, NULL);
|
||||
if (r < 0) {
|
||||
log_error_errno(r, "Failed to serialize item: %m");
|
||||
return MHD_CONTENT_READER_END_WITH_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user