Clean-up: run format-cpp on the tree
[lttng-tools.git] / include / lttng / event-rule / python-logging-internal.hpp
CommitLineData
6530ec7d
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_PYTHON_LOGGING_INTERNAL_H
9#define LTTNG_EVENT_RULE_PYTHON_LOGGING_INTERNAL_H
10
c9e313bc
SM
11#include <common/macros.hpp>
12#include <common/optional.hpp>
28f23191
JG
13#include <common/payload-view.hpp>
14
c9e313bc 15#include <lttng/event-rule/event-rule-internal.hpp>
6530ec7d
JR
16#include <lttng/event-rule/python-logging.h>
17#include <lttng/event.h>
c9e313bc 18#include <lttng/log-level-rule-internal.hpp>
6530ec7d
JR
19
20struct lttng_event_rule_python_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
39struct lttng_event_rule_python_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
28f23191
JG
55ssize_t lttng_event_rule_python_logging_create_from_payload(struct lttng_payload_view *view,
56 struct lttng_event_rule **rule);
6530ec7d
JR
57
58#endif /* LTTNG_EVENT_RULE_PYTHON_LOGGING_INTERNAL_H */
This page took 0.037669 seconds and 4 git commands to generate.