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