]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/logs-show.h
tree-wide: remove Lennart's copyright lines
[thirdparty/systemd.git] / src / shared / logs-show.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
c2f1db8f 2#pragma once
86aa7ba4 3
86aa7ba4 4#include <stdbool.h>
a8fbdf54
TA
5#include <stddef.h>
6#include <stdio.h>
1a6c43e9 7#include <sys/types.h>
86aa7ba4 8
3c756001 9#include "sd-journal.h"
81527be1 10
a8fbdf54 11#include "macro.h"
9bdbc2e2 12#include "output-mode.h"
a8fbdf54 13#include "time-util.h"
71d35b6b 14#include "util.h"
25277cd7 15
9b972c9a 16int show_journal_entry(
08ace05b
LP
17 FILE *f,
18 sd_journal *j,
19 OutputMode mode,
20 unsigned n_columns,
94e0bd7d 21 OutputFlags flags,
cc25a67e 22 char **output_fields,
b4766d5f 23 size_t highlight[2],
94e0bd7d 24 bool *ellipsized);
889e3960
ZJS
25int 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);
86aa7ba4 34
b6741478 35int add_match_this_boot(sd_journal *j, const char *machine);
5ec76417 36
886a64fe
ZJS
37int add_matches_for_unit(
38 sd_journal *j,
39 const char *unit);
40
41int add_matches_for_user_unit(
42 sd_journal *j,
df50185b 43 const char *unit,
886a64fe 44 uid_t uid);
df50185b 45
886a64fe 46int show_journal_by_unit(
1a6c43e9
MT
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,
886a64fe 54 OutputFlags flags,
3c756001
LP
55 int journal_open_flags,
56 bool system_unit,
94e0bd7d 57 bool *ellipsized);
1a6c43e9 58
240a5fe8
LP
59void json_escape(
60 FILE *f,
61 const char* p,
62 size_t l,
63 OutputFlags flags);