Commit Graph

109 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek e3657ecd7f journalctl: add option to forgo ellipsization
Sometimes it is better to see messages in full, and the existing
set of options didn't allow this easily. E.g. now

  journalctl -f --full

will behave like

  tail -f /var/log/messages

of yore.

Long option only for now, since small letters are becoming
scarce, and this doesn't feel like a capital-letter-option.
'-u' would be nice, and the above command would be spelled

  journalctl -fu
2012-11-17 15:32:04 +01:00
Lennart Poettering 83f6936a01 journal: extend catalog header to 64bit for all fields, just to be safe and follow the rest of the file formats 2012-11-16 01:35:11 +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
Lekensteyn 71c0159692 journalctl: require argument for --priority
This fixes a segfault due to a missing value for --priority. -p is
unaffected because it is specified in the getopt_long parameter list.
2012-11-15 16:09:02 +01:00
Dave Reisner a9cdc94f7f enable localization for common *ctl commands 2012-11-12 14:16:07 -05:00
Michal Schmidt 0901758558 util: add is_locale_utf8()
journalctl and vconsole-setup both implement utf8 locale detection.
Let's have a common function for it.
The next patch will add another use.
2012-11-02 17:27:15 +01:00
Lennart Poettering db87a36e74 journalctl: remove left-over log message 2012-10-24 01:06:31 +02:00
Lennart Poettering ed757c0cb0 util: unify line caching and column caching 2012-10-19 00:07:55 +02:00
Lennart Poettering 8481248b9f util: unify usage of on_tty() in util.c 2012-10-19 00:07:55 +02:00
Lennart Poettering f89a3b6f5b journalctl: unify ellipsation handling between journalctl and systemctl 2012-10-18 23:35:44 +02:00
Lennart Poettering cd4b13e0bf journalctl: don't ellipsize unless on a tty 2012-10-18 23:35:44 +02:00
Lennart Poettering fd6e887537 journalctl: honour -n if -F is used 2012-10-18 23:35:44 +02:00
Lennart Poettering 15804cebfd journalctl: move access check before the first access to the journal files 2012-10-18 03:35:58 +02:00
Lennart Poettering 15119c1602 journalctl: implement quering field values with new -F switch
Example:

        journalctl -F _SYSTEMD_UNIT

will list all units that ever logged to the journal.
2012-10-18 03:35:58 +02:00
Lennart Poettering 3c1668da62 journal: add ability to list values a specified field can take in all entries of the journal
The new 'unique' API allows listing all unique field values that a field
specified by a field name can take in all entries of the journal. This
allows answering queries such as "What units logged to the journal?",
"What hosts have logged into the journal?", "Which boot IDs have logged
into the journal?".

Ultimately this allows implementation of tools similar to lastlog based
on journal data.

Note that listing these field values will not work for journal files
created with older journald, as the field values are not indexed in
older files.
2012-10-18 03:35:18 +02:00
Lennart Poettering c3f60ec54d journalctl: add --unit=/-u to match by unit name
This applies unit_name_mangle() to the specified unit names and hence
can handle weird characters nicely and will add unit suffixes as
necessary.
2012-10-16 02:59:27 +02:00
Lennart Poettering 9048b11f8b journalctl: harmonise in-stream comments
From now on, always use ANSI-SQL-style comments in log streams, i.e.
prefix with --. We also suffix things with this, just to be nice...
2012-10-16 01:09:09 +02:00
Zbigniew Jędrzejewski-Szmek edfb521a21 journalctl: skip informational messages in export/json modes 2012-10-15 18:17:49 +02:00
Zbigniew Jędrzejewski-Szmek c3eba2ab4e journalctl: make --follow really work 2012-10-14 15:29:38 +00:00
Zbigniew Jędrzejewski-Szmek e3ed66c52e journalctl: make --follow work again
Stopped working after cfbc22ab 'journalctl: implement --since= and
--until for filtering by time'.
2012-10-13 21:37:42 +02:00
Lennart Poettering cfbc22abd0 journalctl: implement --since= and --until for filtering by time 2012-10-11 16:43:37 +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 ad9eafab9f journalctl: properly parse --cursor= long getopt in addition to short -c 2012-10-10 01:35:24 +02:00
Lennart Poettering 7a69007a24 journal: implement follow mode for HTTP GET in gatewayd 2012-10-09 01:31:27 +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 8f14c8327b journalctl: add --cursor switch 2012-09-28 00:55:24 +02:00
Lennart Poettering 2a7b539a82 journald: always pass first entry timestamp back from journal_file_verify() 2012-09-24 15:02:43 +02:00
Mirco Tischler 73726ac898 journalctl: print correct timespan in verify
The old code used a timestamp to print a timespan for unsealed journalfiles,
incorrectly showing things like 2230 days of unsealed entries. Print the timespan
between the first and last entry instead.
2012-09-24 14:56:52 +02:00
Dave Reisner 585314e84c journalctl: reset cached column count on SIGWINCH
This requires a little bit of tip-toeing around to explicitly avoid
touching the environment from a sig handler. Instead, simply create a
function to reset the var to its "unset" state, allowing the next call
to columns() to recalculate and cache the new value.
2012-09-24 08:38:03 -04:00
Lennart Poettering 1705594f59 journalctl: make the argument to -n optional 2012-09-21 22:33:02 +02:00
Lennart Poettering cf5a343211 journalctl: print QR code only if we are running on an UTF-8 system 2012-09-12 09:23:38 +02:00
Lennart Poettering a1a03e3075 journal: add call to determine current journal file disk usage 2012-09-07 23:20:28 +02:00
Lennart Poettering cd931c0a46 journalctl: show "Reboot" markers in output only when showing local-only entries 2012-09-05 16:52:46 -07:00
Lennart Poettering 9e8a535faa journalctl: replace --local by --merge, i.e. don't interleave remote journals by default 2012-09-05 16:49:00 -07: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
Lennart Poettering 99add6fd0b journalctl: complain if unprivileged users attempt to access the journal and persistant logging is off 2012-08-22 04:45:17 +02:00
Lennart Poettering c0ca7aeec9 journalctl: be more friendly when informing about seal verification 2012-08-21 23:03:20 +02:00
Lennart Poettering cedb42bb69 journalctl: add a bit of color to the output 2012-08-21 15:53:48 +02:00
Lennart Poettering 89fef99014 journal: automatically evolve FSS key even when nothing is logged 2012-08-21 01:29:17 +02:00
Lennart Poettering c05276f23e journalctl: reword things a bit 2012-08-21 01:02:08 +02:00
Lennart Poettering adac1c93ab journal: rearrange QR code output a bit to fi to 80x25 terminals 2012-08-20 22:22:05 +02:00
Lennart Poettering 197c0da225 journalctl: explain QR code use 2012-08-20 22:11:55 +02:00
Lennart Poettering f6a971bc0b journalctl: output FSS key as QR code on generating 2012-08-20 22:02:19 +02:00
Lennart Poettering feb12d3ed2 journal: make libgcrypt dependency optional 2012-08-20 16:51:46 +02:00
Lennart Poettering f7fab8a5ae journal: fix tag ordering check 2012-08-20 15:59:33 +02:00
Lennart Poettering b72631e59c jounral: write bit fiddling test
This test goes through every single bit in a journal file, toggles it,
and checks if this change is detected by the verification.
2012-08-18 00:40:03 +02:00
Lennart Poettering f982e6f761 journal: set secure deletion flags for FSS file 2012-08-17 22:10:11 +02:00
Lennart Poettering 6c7be122ac journal: after verification output validated time range 2012-08-17 03:30:22 +02:00
Lennart Poettering baed47c3c2 journal: rework terminology
Let's clean up our terminology a bit. New terminology:

FSS = Forward Secure Sealing
FSPRG = Forward Secure Pseudo-Random Generator

FSS is the combination of FSPRG and a HMAC.

Sealing = process of adding authentication tags to the journal.
Verification = process of checking authentication tags to the journal.

Sealing Key = The key used for adding authentication tags to the journal.
Verification Key = The key used for checking authentication tags of the journal.
Key pair = The pair of Sealing Key and Verification Key

Internally, the Sealing Key is the combination of the FSPRG State plus
change interval/start time.

Internally, the Verification Key is the combination of the FSPRG Seed
plus change interval/start time.
2012-08-17 00:45:18 +02:00
Lennart Poettering 14d10188de journal: add FSPRG journal authentication 2012-08-16 23:58:14 +02:00