Commit Graph

27 Commits

Author SHA1 Message Date
Lennart Poettering 93b73b064c journal: by default do not decompress dat objects larger than 64K
This introduces a new data threshold setting for sd_journal objects
which controls the maximum size of objects to decompress. This is
relieves the library from having to decompress full data objects even
if a client program is only interested in the initial part of them.

This speeds up "systemd-coredumpctl" drastically when invoked without
parameters.
2012-11-21 00:28:00 +01:00
Lennart Poettering d4205751d4 journal: implement message catalog
The message catalog can be used to attach short help texts to log lines,
keyed by their MESSAGE_ID= fields. This is useful to help the
administrator understand the context and cause of a message, find
possible solutions and find further related documentation.

Since this is keyed off MESSAGE_ID= this will only work for native
journal messages.

The message catalog supports i18n, and is useful to augment english
language system messages with explanations in the local language.

This commit only includes short explanatory messages for a few example
message IDs, we'll add more complete documentation for the relevant
systemd messages later on.
2012-11-15 23:09:07 +01:00
Lennart Poettering d99ae53a73 journal: properly serialize fields with multiple values into JSON
This now matches the JSON serialization spec from:

http://www.freedesktop.org/wiki/Software/systemd/json
2012-10-25 01:24:44 +02:00
Lennart Poettering cd4b13e0bf journalctl: don't ellipsize unless on a tty 2012-10-18 23:35:44 +02:00
Lennart Poettering 240a5fe83e journal: add ability to list unique fields to gatewayd 2012-10-18 22:34:42 +02:00
Lennart Poettering 48383c2511 journal: support epxorting the journal in a format suitable for text/event-stream 2012-10-11 02:37:10 +02:00
Lennart Poettering 08ace05beb logs-show: various cleanups
Among other cleanups this introduces a threshold for the size of binary
blobs we serialize as integer arrays in the JSON output. THis can be
disabled via --all.
2012-09-28 00:55:24 +02:00
Lennart Poettering c198300fc4 journalctl: don't choke on entries with no MESSAGE= field
https://bugs.freedesktop.org/show_bug.cgi?id=50177
2012-09-18 11:12:31 +02:00
Lennart Poettering a6e87e90ed journalctl: rework JSON output mode
This splits the JSON output mode into different modes: json and
json-pretty. The former printing one entry per line, the latter showing
JSON objects nicely indented and in multiple lines to make it easier to
read for humans.
2012-09-05 15:25:32 -07:00
Brandon Philips e268b81e97 shared: logs-show: fflush after each output type
journalctl -f redirected to a pipe or file wasn't working for some
output formats but was working for json. It turns out only json was
doing an fflush.

Make all output formats flush.
2012-09-03 19:16:20 -07:00
Lennart Poettering 1946b0bd55 journalctl: include logs from PID 1 about services in systemctl status 2012-09-03 18:59:05 -07:00
Lennart Poettering 64825d3c58 fix a couple of issues found with llvm-analyze 2012-08-08 23:54:21 +02:00
Shawn Landen 193556b69e logs-show: fix off-by-one error
Ellipsize lines that are one character too long.
2012-08-03 18:12:07 +02:00
Lennart Poettering 498261871d journalctl: hightlight log lines by priority
warn/notice = bright white
< error = red
2012-07-26 16:56:21 +02:00
Lennart Poettering 46b0d92225 logs-show: fix OOM path 2012-07-26 16:56:21 +02:00
Shawn Landden 0d0f0c50d3 log.h: new log_oom() -> int -ENOMEM, use it
also a number of minor fixups and bug fixes: spelling, oom errors
that didn't print errors, not properly forwarding error codes,
few more consistency issues, et cetera
2012-07-26 11:48:26 +02:00
Shawn Landden 669241a076 use "Out of memory." consistantly (or with "\n")
glibc/glib both use "out of memory" consistantly so maybe we should
consider that instead of this.

Eliminates one string out of a number of binaries. Also fixes extra newline
in udev/scsi_id
2012-07-25 11:23:57 +02:00
Eelco Dolstra b61a4660fc journalctl: fix assertion failure in ellipsize_mem()
When showing the journal through "journalctl --no-pager", if the
prefix of the log message (i.e. the date and syslog identifier) is
less than 3 characters shorter than the width of the terminal, you
get:

Assertion 'new_length >= 3' failed at src/shared/util.c:3859, function ellipsize_mem(). Aborting.

because there is not enough space for the "...".  This patch add the
necessary check.
2012-07-20 00:12:30 +02:00
Zbigniew Jędrzejewski-Szmek 92a1fd9e95 journalctl: do not ellipsize when using pager
If a pager is used, ellipsization is redundant — the pager does
that better by hiding the part that cannot be shown. Pager's advantage
is that the user can press → to view the hidden part of a message,
and then ← to return.
2012-07-17 17:20:58 +02:00
Zbigniew Jędrzejewski-Szmek 085d71209b logs: Adapt interface in log-show.c (show_journal_by_unit)
Convert more flag arguments into one flag variable.
2012-07-17 17:20:58 +02:00
Zbigniew Jędrzejewski-Szmek 25277cd7fb logs: Adapt interface in log-show.c (output_journal)
In preparation for adding more output switches, convert a series of
flags arguments into one flag variable.
2012-07-17 17:20:57 +02:00
Lennart Poettering b59866aefa man: document sd_journal_get_cutoff_realtime_usec() 2012-07-13 20:17:37 +02:00
Zbigniew Jędrzejewski-Szmek ba961854dd journalctl: show any printable Unicode character
This makes sure we are OK in outputting all valid, non-control UTF-8
characters, instead of just printable 7bit ASCII.
2012-07-13 01:07:41 +02:00
Lennart Poettering e02d1cf72d journal: introduce sd_journal_wait() to simplify writing synchronous clients 2012-07-10 21:46:11 +02:00
Lennart Poettering 089842938d journal: expose and make use of cutoff times of journal
This helps explaining when the log output of "systemctl status" is
incomplete because the logs got rotated since the service was started.
2012-06-17 00:03:12 +02:00
Lennart Poettering 7ea07dcdda fix a couple of things found with the llvm static analyzer 2012-04-13 13:58:50 +02:00
Kay Sievers f33d3ec1d7 move more common files to shared/ and add them to shared.la 2012-04-12 02:39:37 +02:00
Renamed from src/logs-show.c (Browse further)