]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/logs-show.h
tree-wide: remove Lennart's copyright lines
[thirdparty/systemd.git] / src / shared / logs-show.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include <stdbool.h>
5 #include <stddef.h>
6 #include <stdio.h>
7 #include <sys/types.h>
8
9 #include "sd-journal.h"
10
11 #include "macro.h"
12 #include "output-mode.h"
13 #include "time-util.h"
14 #include "util.h"
15
16 int show_journal_entry(
17 FILE *f,
18 sd_journal *j,
19 OutputMode mode,
20 unsigned n_columns,
21 OutputFlags flags,
22 char **output_fields,
23 size_t highlight[2],
24 bool *ellipsized);
25 int show_journal(
26 FILE *f,
27 sd_journal *j,
28 OutputMode mode,
29 unsigned n_columns,
30 usec_t not_before,
31 unsigned how_many,
32 OutputFlags flags,
33 bool *ellipsized);
34
35 int add_match_this_boot(sd_journal *j, const char *machine);
36
37 int add_matches_for_unit(
38 sd_journal *j,
39 const char *unit);
40
41 int add_matches_for_user_unit(
42 sd_journal *j,
43 const char *unit,
44 uid_t uid);
45
46 int show_journal_by_unit(
47 FILE *f,
48 const char *unit,
49 OutputMode mode,
50 unsigned n_columns,
51 usec_t not_before,
52 unsigned how_many,
53 uid_t uid,
54 OutputFlags flags,
55 int journal_open_flags,
56 bool system_unit,
57 bool *ellipsized);
58
59 void json_escape(
60 FILE *f,
61 const char* p,
62 size_t l,
63 OutputFlags flags);