Tests: Fix: Use '.logfile' instead of '.log' for test app output
[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 #define LTTNG_LOG4J_EVENT_RULE_AT_LEAST_AS_SEVERE_AS_OP ">="
21
22 struct lttng_event_rule_log4j_logging {
23 struct lttng_event_rule parent;
24
25 /* Name pattern. */
26 char *pattern;
27
28 /* Filter. */
29 char *filter_expression;
30
31 /* Log level. */
32 struct lttng_log_level_rule *log_level_rule;
33
34 /* internal use only. */
35 struct {
36 char *filter;
37 struct lttng_bytecode *bytecode;
38 } internal_filter;
39 };
40
41 struct lttng_event_rule_log4j_logging_comm {
42 /* Includes terminator `\0`. */
43 uint32_t pattern_len;
44 /* Includes terminator `\0`. */
45 uint32_t filter_expression_len;
46 /* enum lttng_log_level_rule_comm + payload if any */
47 uint32_t log_level_rule_len;
48 /*
49 * Payload is composed of, in that order:
50 * - pattern (null terminated),
51 * - filter expression (null terminated),
52 * - log level rule serialized object,
53 */
54 char payload[];
55 } LTTNG_PACKED;
56
57 ssize_t lttng_event_rule_log4j_logging_create_from_payload(struct lttng_payload_view *view,
58 struct lttng_event_rule **rule);
59
60 #endif /* LTTNG_EVENT_RULE_LOG4J_LOGGING_INTERNAL_H */
This page took 0.032729 seconds and 5 git commands to generate.