Clogit - log server messages in local log or in system logger
int Cinitlog (char *cmd, char
int Clogit (int level, char *func,
char *msg, ...)
int Cvlogit (int level, char *func,
char *msg, va_list ap)
initializes the server logging routines.
logs server messages in a local log or in the system logger.
is the same as Clogit
but takes a va_list instead of a
variable number of arguments.
- specifies a string to be prepended to the syslog
- specifies a path for the server log file. If set to
syslog, the system logger will be used. By default, only messages
with level at least as important as LOG_INFO will be logged. The level
threshold can be changed with the environment variable LOG_PRIORITY.
- is associated with the message. The possible values, in
order of decreasing importance are:
- is the name of the function that issues the message.
- is a format as in printf.
These routines return 0 if the operation was successful or -1 if the operation
failed. In the latter case, serrno
is set appropriately.
- logfile is a NULL pointer.
- The length of logfile exceeds