2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2012-07-18 19:07:51 +02:00
|
|
|
#pragma once
|
2012-01-03 21:08:28 +01:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
2015-12-03 21:13:37 +01:00
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdio.h>
|
2013-01-17 18:55:07 +01:00
|
|
|
#include <sys/types.h>
|
2012-01-03 21:08:28 +01:00
|
|
|
|
2015-01-08 14:38:52 +01:00
|
|
|
#include "sd-journal.h"
|
2012-01-05 16:01:58 +01:00
|
|
|
|
2015-12-03 21:13:37 +01:00
|
|
|
#include "macro.h"
|
2013-01-14 18:16:50 +01:00
|
|
|
#include "output-mode.h"
|
2015-12-03 21:13:37 +01:00
|
|
|
#include "time-util.h"
|
2015-11-18 22:46:33 +01:00
|
|
|
#include "util.h"
|
2012-07-17 07:35:06 +02:00
|
|
|
|
2018-05-16 17:12:53 +02:00
|
|
|
int show_journal_entry(
|
2012-09-27 23:27:10 +02:00
|
|
|
FILE *f,
|
|
|
|
sd_journal *j,
|
|
|
|
OutputMode mode,
|
|
|
|
unsigned n_columns,
|
2013-08-04 01:38:13 +02:00
|
|
|
OutputFlags flags,
|
2017-10-27 05:10:47 +02:00
|
|
|
char **output_fields,
|
2020-05-05 15:02:37 +02:00
|
|
|
const size_t highlight[2],
|
2013-08-04 01:38:13 +02:00
|
|
|
bool *ellipsized);
|
2018-05-16 17:21:51 +02:00
|
|
|
int show_journal(
|
|
|
|
FILE *f,
|
|
|
|
sd_journal *j,
|
|
|
|
OutputMode mode,
|
|
|
|
unsigned n_columns,
|
|
|
|
usec_t not_before,
|
|
|
|
unsigned how_many,
|
|
|
|
OutputFlags flags,
|
|
|
|
bool *ellipsized);
|
2012-01-03 21:08:28 +01:00
|
|
|
|
2013-12-11 22:04:03 +01:00
|
|
|
int add_match_this_boot(sd_journal *j, const char *machine);
|
2013-06-04 00:28:12 +02:00
|
|
|
|
2013-03-14 00:30:05 +01:00
|
|
|
int add_matches_for_unit(
|
|
|
|
sd_journal *j,
|
|
|
|
const char *unit);
|
|
|
|
|
|
|
|
int add_matches_for_user_unit(
|
|
|
|
sd_journal *j,
|
2012-01-04 18:33:36 +01:00
|
|
|
const char *unit,
|
2013-03-14 00:30:05 +01:00
|
|
|
uid_t uid);
|
2012-01-04 18:33:36 +01:00
|
|
|
|
2013-03-14 00:30:05 +01:00
|
|
|
int show_journal_by_unit(
|
2013-01-17 18:55:07 +01:00
|
|
|
FILE *f,
|
|
|
|
const char *unit,
|
2019-11-27 12:13:59 +01:00
|
|
|
const char *namespace,
|
2013-01-17 18:55:07 +01:00
|
|
|
OutputMode mode,
|
|
|
|
unsigned n_columns,
|
|
|
|
usec_t not_before,
|
|
|
|
unsigned how_many,
|
|
|
|
uid_t uid,
|
2013-03-14 00:30:05 +01:00
|
|
|
OutputFlags flags,
|
2015-01-08 14:38:52 +01:00
|
|
|
int journal_open_flags,
|
|
|
|
bool system_unit,
|
2013-08-04 01:38:13 +02:00
|
|
|
bool *ellipsized);
|
2013-01-17 18:55:07 +01:00
|
|
|
|
2012-10-18 22:31:27 +02:00
|
|
|
void json_escape(
|
|
|
|
FILE *f,
|
|
|
|
const char* p,
|
|
|
|
size_t l,
|
|
|
|
OutputFlags flags);
|