]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/output-mode.h
Merge pull request #8676 from keszybz/drop-license-boilerplate
[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
10 #include "macro.h"
11
12 typedef enum OutputMode {
13 OUTPUT_SHORT,
14 OUTPUT_SHORT_FULL,
15 OUTPUT_SHORT_ISO,
16 OUTPUT_SHORT_ISO_PRECISE,
17 OUTPUT_SHORT_PRECISE,
18 OUTPUT_SHORT_MONOTONIC,
19 OUTPUT_SHORT_UNIX,
20 OUTPUT_VERBOSE,
21 OUTPUT_EXPORT,
22 OUTPUT_JSON,
23 OUTPUT_JSON_PRETTY,
24 OUTPUT_JSON_SSE,
25 OUTPUT_CAT,
26 _OUTPUT_MODE_MAX,
27 _OUTPUT_MODE_INVALID = -1
28 } OutputMode;
29
30 /* The output flags definitions are shared by the logs and process tree output. Some apply to both, some only to the
31 * logs output, others only to the process tree output. */
32
33 typedef enum OutputFlags {
34 OUTPUT_SHOW_ALL = 1 << 0,
35 OUTPUT_FOLLOW = 1 << 1,
36 OUTPUT_WARN_CUTOFF = 1 << 2,
37 OUTPUT_FULL_WIDTH = 1 << 3,
38 OUTPUT_COLOR = 1 << 4,
39 OUTPUT_CATALOG = 1 << 5,
40 OUTPUT_BEGIN_NEWLINE = 1 << 6,
41 OUTPUT_UTC = 1 << 7,
42 OUTPUT_KERNEL_THREADS = 1 << 8,
43 OUTPUT_NO_HOSTNAME = 1 << 9,
44 } OutputFlags;
45
46 const char* output_mode_to_string(OutputMode m) _const_;
47 OutputMode output_mode_from_string(const char *s) _pure_;