]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/output-mode.h
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / shared / output-mode.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
9bdbc2e2
LN
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
766cd081
LP
23#include "macro.h"
24
9bdbc2e2
LN
25typedef enum OutputMode {
26 OUTPUT_SHORT,
29a753df 27 OUTPUT_SHORT_FULL,
44bc6e1f 28 OUTPUT_SHORT_ISO,
7e563bfc 29 OUTPUT_SHORT_ISO_PRECISE,
f02d8367
ZJS
30 OUTPUT_SHORT_PRECISE,
31 OUTPUT_SHORT_MONOTONIC,
bb321ed9 32 OUTPUT_SHORT_UNIX,
9bdbc2e2
LN
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
0ff308c8
LP
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
9bdbc2e2
LN
46typedef 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,
ea6c2dd1
LP
52 OUTPUT_CATALOG = 1 << 5,
53 OUTPUT_BEGIN_NEWLINE = 1 << 6,
9fd29044 54 OUTPUT_UTC = 1 << 7,
0ff308c8 55 OUTPUT_KERNEL_THREADS = 1 << 8,
991e274b 56 OUTPUT_NO_HOSTNAME = 1 << 9,
9bdbc2e2 57} OutputFlags;
766cd081
LP
58
59const char* output_mode_to_string(OutputMode m) _const_;
60OutputMode output_mode_from_string(const char *s) _pure_;