Insert a user string trace event
#include <sys/neutrino.h> #include <sys/trace.h> int trace_logf( int code, const char *fmt, ...);
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The trace_logf() function calls TraceEvent() to insert a user string event of class _NTO_TRACE_USER, and of the type specified by code.
The number of bytes written in the log, including the terminating null character, or -1 if an error occurred (errno is set).
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | Read the Caveats |
Signal handler | Read the Caveats |
Thread | Yes |
It isn't safe to call this function from an interrupt handler or a signal handler if the formatting codes or parameters include floating-point elements.