2 * Copyright (C) 2021 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_EVENT_RULE_JUL_LOGGING_INTERNAL_H
9 #define LTTNG_EVENT_RULE_JUL_LOGGING_INTERNAL_H
11 #include <common/payload-view.h>
12 #include <common/macros.h>
13 #include <common/optional.h>
14 #include <lttng/event-rule/event-rule-internal.h>
15 #include <lttng/event-rule/jul-logging.h>
16 #include <lttng/event.h>
17 #include <lttng/log-level-rule-internal.h>
19 struct lttng_event_rule_jul_logging
{
20 struct lttng_event_rule parent
;
26 char *filter_expression
;
29 struct lttng_log_level_rule
*log_level_rule
;
31 /* internal use only. */
34 struct lttng_bytecode
*bytecode
;
38 struct lttng_event_rule_jul_logging_comm
{
39 /* Includes terminator `\0`. */
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
;
46 * Payload is composed of, in that order:
47 * - pattern (null terminated),
48 * - filter expression (null terminated),
49 * - log level rule serialized object,
54 ssize_t
lttng_event_rule_jul_logging_create_from_payload(
55 struct lttng_payload_view
*view
,
56 struct lttng_event_rule
**rule
);
58 #endif /* LTTNG_EVENT_RULE_JUL_LOGGING_INTERNAL_H */