24#ifndef KEYRING_LOG_BUILTINS_DEFINITION_INCLUDED
25#define KEYRING_LOG_BUILTINS_DEFINITION_INCLUDED
91 (
const char *,
size_t)) {
96 (
const char *,
void **)) {
100 (
void *,
const char *,
size_t)) {
108 (
const char *,
void **)) {
124 (
const char *,
const char *,
size_t,
bool)) {
128 (
char *,
size_t,
const char *, ...)) {
160 (
char *to,
size_t n,
const char *fmt, va_list ap))
161 MY_ATTRIBUTE((format(printf, 3, 0)));
166#define KEYRING_LOG_BUILTINS_IMPLEMENTOR(component_name) \
167 BEGIN_SERVICE_IMPLEMENTATION(component_name, log_builtins) \
168 keyring_common::service_definition::Log_builtins_keyring::wellknown_by_type, \
169 keyring_common::service_definition::Log_builtins_keyring:: \
171 keyring_common::service_definition::Log_builtins_keyring:: \
172 wellknown_get_type, \
173 keyring_common::service_definition::Log_builtins_keyring:: \
174 wellknown_get_name, \
175 keyring_common::service_definition::Log_builtins_keyring:: \
177 keyring_common::service_definition::Log_builtins_keyring:: \
179 keyring_common::service_definition::Log_builtins_keyring:: \
181 keyring_common::service_definition::Log_builtins_keyring:: \
182 item_numeric_class, \
183 keyring_common::service_definition::Log_builtins_keyring::item_set_int, \
184 keyring_common::service_definition::Log_builtins_keyring:: \
186 keyring_common::service_definition::Log_builtins_keyring:: \
187 item_set_lexstring, \
188 keyring_common::service_definition::Log_builtins_keyring:: \
190 keyring_common::service_definition::Log_builtins_keyring::line_set_flag, \
191 keyring_common::service_definition::Log_builtins_keyring:: \
193 keyring_common::service_definition::Log_builtins_keyring::item_set, \
194 keyring_common::service_definition::Log_builtins_keyring:: \
195 line_item_set_with_key, \
196 keyring_common::service_definition::Log_builtins_keyring::line_item_set, \
197 keyring_common::service_definition::Log_builtins_keyring::line_init, \
198 keyring_common::service_definition::Log_builtins_keyring::line_exit, \
199 keyring_common::service_definition::Log_builtins_keyring:: \
201 keyring_common::service_definition::Log_builtins_keyring:: \
202 line_item_types_seen, \
203 keyring_common::service_definition::Log_builtins_keyring:: \
204 line_get_output_buffer, \
205 keyring_common::service_definition::Log_builtins_keyring:: \
206 line_item_iter_acquire, \
207 keyring_common::service_definition::Log_builtins_keyring:: \
208 line_item_iter_release, \
209 keyring_common::service_definition::Log_builtins_keyring:: \
210 line_item_iter_first, \
211 keyring_common::service_definition::Log_builtins_keyring:: \
212 line_item_iter_next, \
213 keyring_common::service_definition::Log_builtins_keyring:: \
214 line_item_iter_current, \
215 keyring_common::service_definition::Log_builtins_keyring::line_submit, \
216 keyring_common::service_definition::Log_builtins_keyring::message, \
217 keyring_common::service_definition::Log_builtins_keyring::sanitize, \
218 keyring_common::service_definition::Log_builtins_keyring:: \
220 keyring_common::service_definition::Log_builtins_keyring:: \
221 errcode_by_errsymbol, \
222 keyring_common::service_definition::Log_builtins_keyring:: \
224 keyring_common::service_definition::Log_builtins_keyring:: \
225 parse_iso8601_timestamp, \
226 keyring_common::service_definition::Log_builtins_keyring:: \
228 keyring_common::service_definition::Log_builtins_keyring:: \
230 keyring_common::service_definition::Log_builtins_keyring:: \
231 dedicated_errstream, \
232 keyring_common::service_definition::Log_builtins_keyring:: \
234 keyring_common::service_definition::Log_builtins_keyring:: \
236 END_SERVICE_IMPLEMENTATION()
238#define KEYRING_LOG_BUILTINS_STRING_IMPLEMENTOR(component_name) \
239 BEGIN_SERVICE_IMPLEMENTATION(component_name, log_builtins_string) \
240 keyring_common::service_definition::Log_builtins_keyring::malloc, \
241 keyring_common::service_definition::Log_builtins_keyring::strndup, \
242 keyring_common::service_definition::Log_builtins_keyring::free, \
243 keyring_common::service_definition::Log_builtins_keyring::length, \
244 keyring_common::service_definition::Log_builtins_keyring::find_first, \
245 keyring_common::service_definition::Log_builtins_keyring::find_last, \
246 keyring_common::service_definition::Log_builtins_keyring::compare, \
247 keyring_common::service_definition::Log_builtins_keyring::substitutev, \
248 keyring_common::service_definition::Log_builtins_keyring::substitute \
249 END_SERVICE_IMPLEMENTATION()
Definition: keyring_log_builtins_definition.h:34
static bool item_set_int(log_item_data *lid, longlong i) noexcept
Definition: keyring_log_builtins_definition.cc:220
static char * find_first(const char *, int) noexcept
Definition: keyring_log_builtins_definition.h:117
static size_t substitutev(char *to, size_t n, const char *fmt, va_list ap) noexcept
Definition: keyring_log_builtins_definition.cc:373
static log_item * line_item_iter_next(log_item_iter *) noexcept
Definition: keyring_log_builtins_definition.h:83
static void * malloc(size_t len) noexcept
Definition: keyring_log_builtins_definition.cc:347
static const char * errmsg_by_errcode(int mysql_errcode) noexcept
Definition: keyring_log_builtins_definition.cc:330
static log_item * line_item_iter_first(log_item_iter *) noexcept
Definition: keyring_log_builtins_definition.h:80
static void line_exit(log_line *ll) noexcept
Definition: keyring_log_builtins_definition.cc:210
static bool item_numeric_class(log_item_class) noexcept
Definition: keyring_log_builtins_definition.h:57
static log_item_data * item_set(log_item *, log_item_type) noexcept
Definition: keyring_log_builtins_definition.h:65
static log_line * line_init() noexcept
Definition: keyring_log_builtins_definition.cc:204
static int sanitize(log_item *) noexcept
Definition: keyring_log_builtins_definition.h:89
static void line_item_iter_release(log_item_iter *) noexcept
Definition: keyring_log_builtins_definition.h:79
static size_t substitute(char *, size_t, const char *,...) noexcept
Definition: keyring_log_builtins_definition.h:128
static char * find_last(const char *, int) noexcept
Definition: keyring_log_builtins_definition.h:120
static log_service_error reopen_errstream(const char *, void **) noexcept
Definition: keyring_log_builtins_definition.h:108
static longlong errcode_by_errsymbol(const char *) noexcept
Definition: keyring_log_builtins_definition.h:131
static bool item_set_cstring(log_item_data *lid, const char *s) noexcept
Definition: keyring_log_builtins_definition.cc:239
static log_item_type_mask line_item_types_seen(log_line *ll, log_item_type_mask m) noexcept
Definition: keyring_log_builtins_definition.cc:215
static log_item * line_get_output_buffer(log_line *) noexcept
Definition: keyring_log_builtins_definition.h:73
static ulonglong parse_iso8601_timestamp(const char *, size_t) noexcept
Definition: keyring_log_builtins_definition.h:91
static void line_set_flag(log_line *, log_line_flags_mask, log_line_flags_mask) noexcept
Definition: keyring_log_builtins_definition.h:113
static int line_submit(log_line *ll) noexcept
Definition: keyring_log_builtins_definition.cc:248
static int wellknown_by_type(log_item_type) noexcept
Definition: keyring_log_builtins_definition.h:38
static bool item_set_float(log_item_data *, double) noexcept
Definition: keyring_log_builtins_definition.h:68
static int wellknown_by_name(const char *, size_t) noexcept
Definition: keyring_log_builtins_definition.h:41
static int compare(const char *, const char *, size_t, bool) noexcept
Definition: keyring_log_builtins_definition.h:124
static log_item_data * line_item_set(log_line *ll, log_item_type t) noexcept
Definition: keyring_log_builtins_definition.cc:200
static log_service_error close_errstream(void **) noexcept
Definition: keyring_log_builtins_definition.h:104
static log_service_error open_errstream(const char *, void **) noexcept
Definition: keyring_log_builtins_definition.h:96
static log_item_iter * line_item_iter_acquire(log_line *) noexcept
Definition: keyring_log_builtins_definition.h:76
static bool item_generic_type(log_item_type) noexcept
Definition: keyring_log_builtins_definition.h:51
static const char * wellknown_get_name(uint) noexcept
Definition: keyring_log_builtins_definition.h:47
static size_t length(const char *s) noexcept
Definition: keyring_log_builtins_definition.cc:368
static void free(void *ptr) noexcept
Definition: keyring_log_builtins_definition.cc:361
static log_item_data * line_item_set_with_key(log_line *ll, log_item_type t, const char *key, uint32 alloc) noexcept
Definition: keyring_log_builtins_definition.cc:195
static int line_item_count(log_line *) noexcept
Definition: keyring_log_builtins_definition.h:72
static char * strndup(const char *fm, size_t len) noexcept
Definition: keyring_log_builtins_definition.cc:352
static log_service_error write_errstream(void *, const char *, size_t) noexcept
Definition: keyring_log_builtins_definition.h:100
static const char * label_from_prio(int) noexcept
Definition: keyring_log_builtins_definition.h:94
static int dedicated_errstream(void *) noexcept
Definition: keyring_log_builtins_definition.h:103
static int message(int,...) noexcept
Definition: keyring_log_builtins_definition.h:111
static log_item * line_item_iter_current(log_item_iter *) noexcept
Definition: keyring_log_builtins_definition.h:86
static bool item_set_lexstring(log_item_data *lid, const char *s, size_t s_len) noexcept
Definition: keyring_log_builtins_definition.cc:229
static bool item_string_class(log_item_class) noexcept
Definition: keyring_log_builtins_definition.h:54
static int item_inconsistent(log_item *) noexcept
Definition: keyring_log_builtins_definition.h:50
static log_item_type wellknown_get_type(uint) noexcept
Definition: keyring_log_builtins_definition.h:44
static log_item_data * item_set_with_key(log_item *, log_item_type, const char *, uint32) noexcept
Definition: keyring_log_builtins_definition.h:62
Specifies macros to define Components.
enum enum_log_service_error log_service_error
Error codes.
@ LOG_SERVICE_COULD_NOT_MAKE_LOG_NAME
could not make log name
Definition: log_service.h:138
@ LOG_SERVICE_NOTHING_DONE
no error, but no effect either
Definition: log_service.h:102
@ LOG_ITEM_TYPE_NOT_FOUND
Definition: log_shared.h:212
uint64 log_line_flags_mask
a bit mask with flags describing a log line
Definition: log_shared.h:230
enum enum_log_item_class log_item_class
@ LOG_ITEM_END
end of list, see above
Definition: log_shared.h:125
enum enum_log_item_type log_item_type
item_type – what to log
uint64 log_item_type_mask
a bit mask of log_types.
Definition: log_shared.h:221
unsigned long long int ulonglong
Definition: my_inttypes.h:56
long long int longlong
Definition: my_inttypes.h:55
uint32_t uint32
Definition: my_inttypes.h:67
Definition: keyring_encryption_service_definition.h:32
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Specifies macros to define Service Implementations.
#define DEFINE_METHOD(retval, name, args)
A macro to ensure method implementation has required properties, that is it does not throw exceptions...
Definition: service_implementation.h:79
Iterator over the key/value pairs of a log_line.
Definition: keyring_log_builtins_definition.cc:64
Definition: log_shared.h:201
log_line ("log event")
Definition: keyring_log_builtins_definition.cc:72
Definition: log_shared.h:190
int n
Definition: xcom_base.cc:509