Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

log.h File Reference

Autoproc logging. More...

Go to the source code of this file.

Typedefs

Enumerations

Functions


Detailed Description

Autoproc logging.


Typedef Documentation

typedef void(* LogHandler)(int level, const char *domain, const char *message)
 

Function prototype for a log handler A log handler is responsible for processing a log message.

Log level filtering is done before the handlers are called. A log handler will only be called if a log message's priority is equal or higher than the log handler's priority.

Parameters:
level The log level.
domain The domain.
message The log message.
See also:
log_console_handler()

log_syslog_handler()

log_add_handler()

log_translate_level()


Enumeration Type Documentation

enum LogLevel
 

The log levels.

Log levels in ascending priority.

Enumeration values:
LOG_LEVEL_ANY  Can be used as default level for log handlers: Below lowest priority.
LOG_LEVEL_DEBUG  For debugging messages - lowest priority.
LOG_LEVEL_INFO  For informative messages.
LOG_LEVEL_WARNING  For warnings.
LOG_LEVEL_ERROR  For errors.
LOG_LEVEL_FATAL  For fatal errors - highest priority.


Function Documentation

void log_perror const char *  message  ) 
 

Perror equivalent.message Message text.

Prints a log message which consists of a message text and the description of the last error encountered, separated by a colon.

See also:
perror()

int log_translate_string const char *  level_string  ) 
 

Translates a string to a log level.

Parameters:
level_string Log level as a string.
Returns:
For a string "X" or "x", LOG_LEVEL_X is returned, where X is one of the log levels. If the string is not recognized, LOG_LEVEL_ALL is returned.

void log_vwrite int  level,
const char *  format,
va_list  args
 

Writes a log message.

Parameters:
level Level assigned to the message.
format Format string, like in printf().
args List of arguments


Generated on Fri Jan 20 10:12:18 2006 by  doxygen 1.4.2