[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: End of hypocrisy ?



On Thu, Aug 7, 2014 at 11:49 AM, AW <debian.list.tracker@1024bits.com> wrote:
> On Thu, 7 Aug 2014 16:19:03 +0100
> Darac Marjal <mailinglist@darac.org.uk> wrote:
>
>  > Consider it to be another database format. You wouldn't necessarily try
>  > to cat a MySQL or PostgreSQL datastore; you'd use the appropriate tools
>  > to select all from it.
>
> Yes.  But it's not.  Although it should and could be an easily queried data
> store.
> ...
>     SYSLOG_IDENTIFIER=apache2
>     _PID=1808
>     _COMM=apache2
>     _CMDLINE=/bin/sh /etc/init.d/apache2 start
>     _SYSTEMD_CGROUP=/system.slice/apache2.service
>     _SYSTEMD_UNIT=apache2.service
>     MESSAGE=.
> Thu 2014-08-07 06:21:24.805036 EDT [...]
>     PRIORITY=6
>     _UID=0
>     _GID=0
> ...
>
> This is filled with problems and pitfalls.  And the outputted text from the
> data store search tool is terribly formatted for further inclusion with other
> regular GNU/Linux command line text processing tools.  I would say, systemd and
> journald are a great start to a great end -- but right now, it's not so much
> fun...

journalctl has output options:

-o, --output=

Controls the formatting of the journal entries that are shown. Takes
one of the following options:

short

is the default and generates an output that is mostly identical to the
formatting of classic syslog files, showing one line per journal
entry.

short-iso

is very similar, but shows ISO 8601 wallclock timestamps.

short-precise

is very similar, but shows timestamps with full microsecond precision.

short-monotonic

is very similar, but shows monotonic timestamps instead of wallclock timestamps.

verbose

shows the full-structured entry items with all fields.

export

serializes the journal into a binary (but mostly text-based) stream
suitable for backups and network transfer (see Journal Export Format
for more information).

json

formats entries as JSON data structures, one per line (see Journal
JSON Format for more information).

json-pretty

formats entries as JSON data structures, but formats them in multiple
lines in order to make them more readable by humans.

json-sse

formats entries as JSON data structures, but wraps them in a format
suitable for Server-Sent Events.

cat

generates a very terse output, only showing the actual message of each
journal entry with no metadata, not even a timestamp.


Reply to: