C/C++ API Reference
Loading...
Searching...
No Matches
log_tokenized_light.h
1// Copyright 2026 The Pigweed Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may not
4// use this file except in compliance with the License. You may obtain a copy of
5// the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12// License for the specific language governing permissions and limitations under
13// the License.
14#pragma once
15
16#include <stdint.h>
17
18#include "pw_log_tokenized/config.h"
19#include "pw_preprocessor/compiler.h"
20#include "pw_preprocessor/util.h"
21#include "pw_tokenizer/tokenize.h"
22
24
28#define PW_LOG_TOKENIZED_TO_GLOBAL_HANDLER(level, module, flags, message, ...) \
29 do { \
30 (void)level; \
31 (void)flags; \
32 PW_LOG_TOKENIZED_ENCODE_MESSAGE_LIGHT( \
33 PW_LOG_TOKENIZED_FORMAT_STRING(module, message), __VA_ARGS__); \
34 } while (0)
35
40#define PW_LOG_TOKENIZED_ENCODE_MESSAGE_LIGHT(format, ...) \
41 do { \
42 PW_TOKENIZE_FORMAT_STRING( \
43 PW_TOKENIZER_DEFAULT_DOMAIN, UINT32_MAX, format, __VA_ARGS__); \
44 _pw_log_tokenized_EncodeTokenizedLogWithoutMetadata( \
45 _pw_tokenizer_token, \
46 PW_TOKENIZER_ARG_TYPES(__VA_ARGS__) PW_COMMA_ARGS(__VA_ARGS__)); \
47 } while (0)
48
50PW_EXTERN_C_START
51
52void _pw_log_tokenized_EncodeTokenizedLogWithoutMetadata(
53 pw_tokenizer_Token token, pw_tokenizer_ArgTypes types, ...);
54
55PW_EXTERN_C_END
uint32_t pw_tokenizer_Token
Definition: tokenize.h:41