[systemd-devel] [PATCH] journalctl: add --iso-dates for long timestamps
lennart at poettering.net
Wed Jul 17 16:36:51 PDT 2013
On Wed, 17.07.13 17:58, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
> > + </para></listitem>
> > + </varlistentry>
> So, now we have -o short, -o short-monotonic, and --iso-dates.
> I'm sure we'll add a relative timestamp mode like the excellent one in
> dmesg --human output in recent util-linux. So I'd say that it makes
> sense to deprecate short-monotonic and add a new switch --timestamps,
> --timestamps=monotonic → old short-monotonic
> --timestamps=iso-date → what you're proposing
> This makes the whole thing easier to grok, imo. Journalctl already has
> 1½ page listing of options...
I agree with Zbigniew here. Having this feature sounds useful, but
please not in a new switch of its own. However I am not convinced that a
--timestamps= switch would be necessary for this either, because I
figure that the only --output= mode where iso dates would be useful
would be "short". It's not useful for the "json", "json-pretty",
"json-sse", "export", or "cat" modes, and only semi-useful for "verbose"
mode. It's primarily useful for the "short" mode. Given that we already
have a "short-monotonic" mode, maybe we should just add more like these?
i.e. --output=short-iso or so?
If one day we really get multiple modes where ISO dates could be useful
then maybe we could internally handles this by considering the --output=
param no longer as single value but always as a pair separated by a dash
or so. If you follow what I mean.
So, yeah, I'd think adding this as "--output=short-iso" or so would be
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel