fix: relayd: unaligned access in trace_chunk_registry_ht_key_hash
[lttng-tools.git] / include / lttng / event-rule / log4j-logging-internal.hpp
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_LOG4J_LOGGING_INTERNAL_H
9 #define LTTNG_EVENT_RULE_LOG4J_LOGGING_INTERNAL_H
10
11 #include <common/macros.hpp>
12 #include <common/optional.hpp>
13 #include <common/payload-view.hpp>
14
15 #include <lttng/event-rule/event-rule-internal.hpp>
16 #include <lttng/event-rule/log4j-logging.h>
17 #include <lttng/event.h>
18 #include <lttng/log-level-rule-internal.hpp>
19
20 struct lttng_event_rule_log4j_logging {
21 struct lttng_event_rule parent;
22
23 /* Name pattern. */
24 char *pattern;
25
26 /* Filter. */
27 char *filter_expression;
28
29 /* Log level. */
30 struct lttng_log_level_rule *log_level_rule;
31
32 /* internal use only. */
33 struct {
34 char *filter;
35 struct lttng_bytecode *bytecode;
36 } internal_filter;
37 };
38
39 struct lttng_event_rule_log4j_logging_comm {
40 /* Includes terminator `\0`. */
41 uint32_t pattern_len;
42 /* Includes terminator `\0`. */
43 uint32_t filter_expression_len;
44 /* enum lttng_log_level_rule_comm + payload if any */
45 uint32_t log_level_rule_len;
46 /*
47 * Payload is composed of, in that order:
48 * - pattern (null terminated),
49 * - filter expression (null terminated),
50 * - log level rule serialized object,
51 */
52 char payload[];
53 } LTTNG_PACKED;
54
55 ssize_t lttng_event_rule_log4j_logging_create_from_payload(struct lttng_payload_view *view,
56 struct lttng_event_rule **rule);
57
58 #endif /* LTTNG_EVENT_RULE_LOG4J_LOGGING_INTERNAL_H */
This page took 0.030983 seconds and 4 git commands to generate.