printf
Action
void printf(string format, ...)
Like trace
, the printf
action traces D expressions. However, printf
enables elaborate printf
style formatting. Like printa
the parameters consist of a format string followed by a variable number of arguments. By default, the arguments are traced to the directed buffer. The arguments are later formatted for output by dtrace
according to the specified format string. For example, the first two examples of trace
from trace Action could be combined in a single printf
:
printf("execname is %s; priority is %d", execname, curlwpsinfo->pr_pri);
For more information about printf
, see Output Formatting in DTrace. Also, see the printf
(3C) man page.