C/C++ API Reference
Loading...
Searching...
No Matches
Tokenized args

Oveview

Learn more: Tokenized log arguments

Namespaces

namespace  pw
 The Pigweed namespace.
 

Macros

#define PW_LOG_ENUM_FMT(enum)   PW_LOG_TOKEN_FMT(#enum)
 
#define PW_LOG_TOKEN_TYPE   const char*
 
#define PW_LOG_TOKEN_DEFAULT_VALUE   nullptr
 
#define PW_LOG_TOKEN(...)    PW_DELEGATE_BY_ARG_COUNT(_PW_STRING_OPTIONAL_DOMAIN_, __VA_ARGS__)
 
#define _PW_STRING_OPTIONAL_DOMAIN_1(string_literal)   string_literal
 
#define _PW_STRING_OPTIONAL_DOMAIN_2(domain, string_literal)   string_literal
 
#define PW_LOG_TOKEN_EXPR(...)    PW_DELEGATE_BY_ARG_COUNT(_PW_STRING_OPTIONAL_DOMAIN_, __VA_ARGS__)
 
#define PW_LOG_TOKEN_FMT(...)   "%s"
 
#define PW_LOG_ENUM(enumerator)   ::pw::tokenizer::EnumToString(enumerator)
 
#define PW_LOG_NESTED_TOKEN_FMT(...)   "%s::%s"
 

Macro Definition Documentation

◆ PW_LOG_ENUM

#define PW_LOG_ENUM (   enumerator)    ::pw::tokenizer::EnumToString(enumerator)

If nested tokenization is supported by the logging backend, this will return a token representation of the enum.

For non-tokenizing backends, defaults to the string representation of the enum.

◆ PW_LOG_ENUM_FMT

#define PW_LOG_ENUM_FMT (   enum)    PW_LOG_TOKEN_FMT(#enum)

If nested tokenization is supported by the logging backend, this is a format specifier to declare a nested token with a specific domain value.

For non-tokenizing backends, defaults to the string specifier s.

◆ PW_LOG_NESTED_TOKEN_FMT

#define PW_LOG_NESTED_TOKEN_FMT (   ...)    "%s::%s"

If nested tokenization is supported by the logging backend, this is an alias for PW_NESTED_TOKEN_FMT.

For non-tokenizing backends, defaults to the string specifier s.

◆ PW_LOG_TOKEN

#define PW_LOG_TOKEN (   ...)     PW_DELEGATE_BY_ARG_COUNT(_PW_STRING_OPTIONAL_DOMAIN_, __VA_ARGS__)

If nested tokenization is supported by the logging backend, this is an alias for PW_TOKENIZE_STRING. No-op otherwise.

◆ PW_LOG_TOKEN_DEFAULT_VALUE

#define PW_LOG_TOKEN_DEFAULT_VALUE   nullptr

An "empty" value for a token.

If nested tokenization is supported by the logging backend, this is 0. Otherwise, it is nullptr.

◆ PW_LOG_TOKEN_EXPR

#define PW_LOG_TOKEN_EXPR (   ...)     PW_DELEGATE_BY_ARG_COUNT(_PW_STRING_OPTIONAL_DOMAIN_, __VA_ARGS__)

If nested tokenization is supported by the logging backend, this is an alias for PW_TOKENIZE_STRING_EXPR. No-op otherwise.

◆ PW_LOG_TOKEN_FMT

#define PW_LOG_TOKEN_FMT (   ...)    "%s"

If nested tokenization is supported by the logging backend, this is an alias for PW_TOKEN_FORMAT.

For non-tokenizing backends, defaults to the string specifier s.

◆ PW_LOG_TOKEN_TYPE

#define PW_LOG_TOKEN_TYPE   const char*

If nested tokenization is supported by the logging backend, this is an alias for pw_tokenizer_Token.

For non-tokenizing backends, defaults to const char*.