Back to libut API Reference


SYNOPSIS

    #include "libut/ut.h"
    void UT_LOG( UT_loglevel level, char *message, ... );


DESCRIPTION

This function writes a printf-formatted message at the given log level to the log file. All the printf conversions of the underlying platform are available. The variable-length arguments corresponding to the printf format are passed at the end as usual.

level is one of these five log levels:

Debugk
This log level is reserved for internal use by the libut library.

Debug
Messages mainly related to program development.

Info
Messages of interest.

Warning
Unexpected or undesirable conditions worthy of administrator notice.

Fatal
Unrecoverable situation. Causes the server to exit after writing log message.

The message only appears in the log file if its level matches or is more severe than the current log level.


RELATED CONFIGURATION VARIABLES

The ut_log_level configuration variable defines the server's log level.


RELATED CONTROL PORT COMMANDS

The log control port command can bump the log level up and down (e.g., log more) among other things; see the control port online help.


NOTES

UT_LOG is a macro (hence the uppercase name) which calls UT_log(). By being a macro, it is able to include its own line number and file name in the message.


AUTHOR

Troy D. Hanson <thanson@users.sourceforge.net>