2 * SPDX-License-Identifier: LGPL-2.1-only
4 * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 #include <lttng/tracelog.h>
15 void print_err(const char* msg
, ...)
16 __attribute__((format(printf
, 1, 2)));
18 void print_err(const char* msg
, ...)
23 vtracelog(LTTNG_UST_TRACEPOINT_LOGLEVEL_ERR
, msg
, ap
);
27 int main(int argc
, char **argv
)
31 const char *str
= "mystring test";
35 delay
= atoi(argv
[1]);
37 fprintf(stderr
, "Demo program starting.\n");
41 fprintf(stderr
, "Tracing... ");
43 for (i
= 0; i
< 5; i
++) {
44 print_err("This is a \"%s\" formatted %d error event %lx", str
, i
, l
);
47 fprintf(stderr
, " done.\n");