2 * SPDX-License-Identifier: LGPL-2.1-only
4 * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 #include <lttng/tracelog.h>
14 __attribute__((format(printf
, 1, 2)))
15 void print_err(const char* msg
, ...)
20 vtracelog(TRACE_ERR
, msg
, ap
);
24 int main(int argc
, char **argv
)
28 const char *str
= "mystring test";
32 delay
= atoi(argv
[1]);
34 fprintf(stderr
, "Demo program starting.\n");
38 fprintf(stderr
, "Tracing... ");
40 for (i
= 0; i
< 5; i
++) {
41 print_err("This is a \"%s\" formatted %d error event %lx", str
, i
, l
);
44 fprintf(stderr
, " done.\n");
This page took 0.035969 seconds and 4 git commands to generate.