summaryrefslogtreecommitdiff
path: root/src/shared/output-mode.h
Commit message (Collapse)AuthorAgeFilesLines
* shared/logs-show: add new --output= format "short-delta"Daniel Braunwarth2022-09-231-0/+1
| | | | | | | This new output formatting option is similar to "short-monotonic" but also shows the time delta between two messages. This fixes #24641.
* cgroups-show: optionally show cgroup xattrs + cgroup id in cgroup tree outputLennart Poettering2021-10-071-5/+11
|
* tree-wide: use -EINVAL for enum invalid valuesZbigniew Jędrzejewski-Szmek2021-02-101-1/+1
| | | | | | | | | As suggested in https://github.com/systemd/systemd/pull/11484#issuecomment-775288617. This does not touch anything exposed in src/systemd. Changing the defines there would be a compatibility break. Note that tests are broken after this commit. They will be fixed in the next one.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* shared/logs-show: Remove unused OUTPUT_FOLLOWHATAYAMA Daisuke2020-03-021-9/+8
| | | | | | | | | | | | | As of the commit aae9a96d4b3a8562af9e8c6a23871b442645b954 removing --follow option in systemctl command, OUTPUT_FOLLOW has never been set anywhere. Let's remove it. The condition expression of the if-statement in show_journal() that refers to OUTPUT_FOLLOW now thus evaluates always to true. Hence, the call of sd_journal_wait() is in dead code, and the outer infinite for-loop is meaningless, which we remove as cleanup. There is no functional change by this commit.
* output-mode: add new helper OUTPUT_MODE_IS_JSON()Lennart Poettering2018-12-031-0/+4
| | | | | Just a pretty way to determine whether the selected output mode is a JSON output mode.
* output-mode: add generic helper to pick right JsonFormatFlags for given ↵Lennart Poettering2018-12-031-0/+3
| | | | OutputMode
* journalctl: port JSON output mode to new JSON APILennart Poettering2018-10-111-0/+1
| | | | | | Also, while we are at it, beef it up, by adding json-seq support (i.e. https://tools.ietf.org/html/rfc7464). This is particularly useful in conjunction with jq's --seq switch.
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-4/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* journalctl: add with-unit modeLuca Boccassi2018-05-251-0/+1
| | | | | | | | | | When dealing with a large number of template instances, for example when launching daemons per VRF, it is hard for operators to correlate log lines to arguments. Add a new with-unit mode which, if available, prefixes unit and user unit names when displaying its log messages instead of the syslog identifier. It will also use the full timestamp with timezones, like the short-full mode.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* Add short-iso-precise for journalctl output (#5884)Ian Wienand2017-05-071-0/+1
| | | | This adds a short-iso-precise option for journalctl output. It is similar to short-iso, but includes microseconds.
* journalctl: add new output mode "short-full" (#3880)Lennart Poettering2016-08-031-0/+1
| | | | | | | | | | | This new output mode formats all timestamps using the usual format_timestamp() call we use pretty much everywhere else. Timestamps formatted this way are some ways more useful than traditional syslog timestamps as they include weekday, month and timezone information, while not being much longer. They are also not locale-dependent. The primary advantage however is that they may be passed directly to journalctl's --since= and --until= switches as soon as #3869 is merged. While we are at it, let's also add "short-unix" to shell completion.
* journalctl: add --no-hostname switchLennart Poettering2016-04-221-0/+1
| | | | | | This suppresses output of the hostname for messages from the local system. Fixes: #2342
* journalctl: add output mode where time is shown in seconds since 1st Jan ↵Lennart Poettering2016-04-221-0/+1
| | | | | | | | 1970 UTC aka "UNIX time". Fixes: #2120
* shared: move output_mode_to_string() into output-mode.cLennart Poettering2016-04-221-0/+5
| | | | After all, the enum definition is in output-mode.h
* shared: drop kernel_thread bool from cgroups show codeLennart Poettering2016-04-221-0/+4
| | | | | Make this an output flag instead, so that our function prototypes can lose one parameter
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* journalctl: add --utc optionJan Synacek2014-10-021-0/+1
| | | | Introduce option to display time in UTC.
* systemctl: suppress duplicate newline if there's not log output in ↵Lennart Poettering2014-03-131-1/+2
| | | | "systemctl status"
* logs-show: add short-precise mode with us timestampsZbigniew Jędrzejewski-Szmek2013-08-201-1/+2
| | | | | | Also, always show us timestamps in verbose mode. https://bugzilla.redhat.com/show_bug.cgi?id=991678
* journalctl: add ”short-iso” output format with verbose ISO8601 timestampsTomasz Torcz2013-07-181-0/+1
| | | | | Example: 2013-07-18T10:10:01+0200 sandworm CROND[20957]: (root) CMD (/usr/lib64/sa/sa1 1 1)
* systemctl,loginctl,cgls: do not ellipsize cgroup members when --full is ↵Lukas Nykryn2013-01-161-0/+44
specified New file output.h with output flags and modes. --full parameter also for cgls and loginctl. Include 'all' parameter in flags (show_cgroup_by_path, show_cgroup, show_cgroup_and_extra, show_cgroup_and_extra_by_spec). get_process_cmdline with max_length == 0 will not ellipsize output. Replace LINE_MAX with 0 in some calls of get_process_cmdline. [zj: Default to --full when under pager for clgs. Drop '-f' since it wasn't documented and didn't actually work. Reindent a bit. ]