Manual Reference Pages - LOG (9)
printf, uprintf, tprintf, log
- formatted output conversion
printf const char *fmt ...
tprintf struct proc *p int pri const char *fmt ...
uprintf const char *fmt ...
log int pri const char *fmt ...
family of functions are similar to the
family of functions.
The different functions each use a different output stream.
function outputs to the current process controlling tty, while
writes to the console as well as to the logging facility.
function outputs to the tty associated with the process
and the logging facility if
is not -1.
function sends the message to the kernel logging facility, using
the log level as indicated by
and to the console if no process is yet reading the log.
Each of these related functions use the
parameter in the same manner as
adds two other conversion specifiers.
identifier expects two arguments: an
.Vt char * .
These are used as a register value and a print mask for decoding bitmasks.
The print mask is made up of two parts: the base and the
The base value is the output base expressed as an integer value;
for example, \10 gives octal and \20 gives hexadecimal.
The arguments are made up of a sequence of bit identifiers.
Each bit identifier begins with an integer value which is the number of the
bit (starting from 1) this identifier describes.
The rest of the identifier is a string of characters containing the name of
The string is terminated by either the bit number at the start of the next
bit identifier or
for the last bit identifier.
identifier is meant to assist in hexdumps.
It requires two arguments: a
.Vt u_char *
pointer and a
.Vt char *
The memory pointed to be the pointer is output in hexadecimal one byte at
The string is used as a delimiter between individual bytes.
If present, a width directive will specify the number of bytes to display.
By default, 16 bytes of data are output.
parameter (mistakenly called
Alternatively, if a
of -1 is given, the message will be appended to the last log message
started by a previous call to
As these messages are generated by the kernel itself, the facility will
functions return the number of characters displayed.
This example demonstrates the use of the
printf("reg=%b\n", 3, "\10\2BITTWO\1BITONE\n");
printf("out: %4D\n", "AAAA", ":");
will produce the following output:
log(LOG_DEBUG, "%s%d: been there.\n", sc->sc_name, sc->sc_unit);
will add the appropriate debug message at priority
to the system log.
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.