clang-format: specify bitfield spacing to fit with the existing code
[lttng-tools.git] / include / lttng / event-rule / jul-logging-internal.hpp
CommitLineData
b47b01d8
JR
1/*
2 * Copyright (C) 2021 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8#ifndef LTTNG_EVENT_RULE_JUL_LOGGING_INTERNAL_H
9#define LTTNG_EVENT_RULE_JUL_LOGGING_INTERNAL_H
10
c9e313bc
SM
11#include <common/payload-view.hpp>
12#include <common/macros.hpp>
13#include <common/optional.hpp>
14#include <lttng/event-rule/event-rule-internal.hpp>
b47b01d8
JR
15#include <lttng/event-rule/jul-logging.h>
16#include <lttng/event.h>
c9e313bc 17#include <lttng/log-level-rule-internal.hpp>
b47b01d8
JR
18
19struct lttng_event_rule_jul_logging {
20 struct lttng_event_rule parent;
21
22 /* Name pattern. */
23 char *pattern;
24
25 /* Filter. */
26 char *filter_expression;
27
28 /* Log level. */
29 struct lttng_log_level_rule *log_level_rule;
30
31 /* internal use only. */
32 struct {
33 char *filter;
34 struct lttng_bytecode *bytecode;
35 } internal_filter;
36};
37
38struct lttng_event_rule_jul_logging_comm {
39 /* Includes terminator `\0`. */
40 uint32_t pattern_len;
41 /* Includes terminator `\0`. */
42 uint32_t filter_expression_len;
43 /* enum lttng_log_level_rule_comm + payload if any */
44 uint32_t log_level_rule_len;
45 /*
46 * Payload is composed of, in that order:
47 * - pattern (null terminated),
48 * - filter expression (null terminated),
49 * - log level rule serialized object,
50 */
51 char payload[];
52} LTTNG_PACKED;
53
b47b01d8
JR
54ssize_t lttng_event_rule_jul_logging_create_from_payload(
55 struct lttng_payload_view *view,
56 struct lttng_event_rule **rule);
57
58#endif /* LTTNG_EVENT_RULE_JUL_LOGGING_INTERNAL_H */
This page took 0.039154 seconds and 4 git commands to generate.