]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/logs-show.h
journalctl: make matching optionally case sensitive
[thirdparty/systemd.git] / src / shared / logs-show.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
c2f1db8f 2#pragma once
86aa7ba4
LP
3
4/***
5 This file is part of systemd.
6
7 Copyright 2012 Lennart Poettering
8
9 systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
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
86aa7ba4
LP
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
5430f7f2 17 Lesser General Public License for more details.
86aa7ba4 18
5430f7f2 19 You should have received a copy of the GNU Lesser General Public License
86aa7ba4
LP
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
21***/
22
23#include <stdbool.h>
a8fbdf54
TA
24#include <stddef.h>
25#include <stdio.h>
1a6c43e9 26#include <sys/types.h>
86aa7ba4 27
3c756001 28#include "sd-journal.h"
81527be1 29
a8fbdf54 30#include "macro.h"
9bdbc2e2 31#include "output-mode.h"
a8fbdf54 32#include "time-util.h"
71d35b6b 33#include "util.h"
25277cd7 34
08ace05b
LP
35int output_journal(
36 FILE *f,
37 sd_journal *j,
38 OutputMode mode,
39 unsigned n_columns,
94e0bd7d 40 OutputFlags flags,
cc25a67e 41 char **output_fields,
94e0bd7d 42 bool *ellipsized);
86aa7ba4 43
b6741478 44int add_match_this_boot(sd_journal *j, const char *machine);
5ec76417 45
886a64fe
ZJS
46int add_matches_for_unit(
47 sd_journal *j,
48 const char *unit);
49
50int add_matches_for_user_unit(
51 sd_journal *j,
df50185b 52 const char *unit,
886a64fe 53 uid_t uid);
df50185b 54
886a64fe 55int show_journal_by_unit(
1a6c43e9
MT
56 FILE *f,
57 const char *unit,
58 OutputMode mode,
59 unsigned n_columns,
60 usec_t not_before,
61 unsigned how_many,
62 uid_t uid,
886a64fe 63 OutputFlags flags,
3c756001
LP
64 int journal_open_flags,
65 bool system_unit,
94e0bd7d 66 bool *ellipsized);
1a6c43e9 67
240a5fe8
LP
68void json_escape(
69 FILE *f,
70 const char* p,
71 size_t l,
72 OutputFlags flags);