]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/output-mode.h
Merge pull request #2921 from keszybz/do-not-report-masked-units-as-changed
[thirdparty/systemd.git] / src / shared / output-mode.h
1 #pragma once
2
3 /***
4 This file is part of systemd.
5
6 Copyright 2013 Lennart Poettering
7
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version.
12
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
20 ***/
21
22 #include "macro.h"
23
24 typedef enum OutputMode {
25 OUTPUT_SHORT,
26 OUTPUT_SHORT_ISO,
27 OUTPUT_SHORT_PRECISE,
28 OUTPUT_SHORT_MONOTONIC,
29 OUTPUT_SHORT_UNIX,
30 OUTPUT_VERBOSE,
31 OUTPUT_EXPORT,
32 OUTPUT_JSON,
33 OUTPUT_JSON_PRETTY,
34 OUTPUT_JSON_SSE,
35 OUTPUT_CAT,
36 _OUTPUT_MODE_MAX,
37 _OUTPUT_MODE_INVALID = -1
38 } OutputMode;
39
40 /* The output flags definitions are shared by the logs and process tree output. Some apply to both, some only to the
41 * logs output, others only to the process tree output. */
42
43 typedef enum OutputFlags {
44 OUTPUT_SHOW_ALL = 1 << 0,
45 OUTPUT_FOLLOW = 1 << 1,
46 OUTPUT_WARN_CUTOFF = 1 << 2,
47 OUTPUT_FULL_WIDTH = 1 << 3,
48 OUTPUT_COLOR = 1 << 4,
49 OUTPUT_CATALOG = 1 << 5,
50 OUTPUT_BEGIN_NEWLINE = 1 << 6,
51 OUTPUT_UTC = 1 << 7,
52 OUTPUT_KERNEL_THREADS = 1 << 8,
53 OUTPUT_NO_HOSTNAME = 1 << 9,
54 } OutputFlags;
55
56 const char* output_mode_to_string(OutputMode m) _const_;
57 OutputMode output_mode_from_string(const char *s) _pure_;