trace_vnlogf()

Insert a user string trace event, using a variable argument list

Synopsis:

#include <sys/neutrino.h>
#include <sys/trace.h>

int trace_vnlogf( int code,
                  int max,
                  const char *fmt,
                  va_list arglist );

Arguments:

code
The event code, which must be in the range from _NTO_TRACE_USERFIRST through _NTO_TRACE_USERLAST.
max
The maximum length of the string to include in the event, in bytes, or 0 for no limit.
fmt
A printf()-style formatting string.
arglist
A variable argument list of the items required by the fmt string.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The trace_vnlogf() function calls TraceEvent() to insert a user string event of class _NTO_TRACE_USER, and of the type specified by code.

Returns:

The number of bytes written in the log, including the terminating null character, or -1 if an error occurred (errno is set).

Errors:

ECANCELED
The requested action has been canceled.
EFAULT
Bad internal trace buffer address. The requested action has been specified out of order.
ENOMEM
Insufficient memory to allocate the trace buffers.
ENOTSUP
The requested action isn't supported.
EPERM
The application doesn't have permission to perform the action.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler Read the Caveats
Signal handler Read the Caveats
Thread Yes

Caveats:

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.

See also:

printf(), trace_func_enter(), trace_func_exit(), trace_here(), trace_logb(), trace_logbc(), trace_logf(), trace_logi(), trace_nlogf(), TraceEvent(), va_arg(), va_copy(), va_end(), va_start()

tracelogger in the Utilities Reference

System Analysis Toolkit User's Guide

Analyzing Your System with Kernel Tracing chapter of the Integrated Development Environment User's Guide