log.h

Go to the documentation of this file.
00001 /*
00002  * ERSP  Player driver - Logging utilities
00003  */
00004 
00005 #ifndef ERSP_LOG_H
00006 #define ERSP_LOG_H
00007 
00008 /* The LOG_*() macros can be used to log to a file, however, by default log
00009  * messages are written to stderr. Set the following environment variables
00010  * to configure the log behavior:
00011  *
00012  * ERSP_LOG - The path to the log file, it is opened for appending
00013  * ERSP_MSG - A comma separated list containing "error", "warn",
00014  *            "info" and/or "debug" which can be used to limit
00015  *            what messages to emit to the log.
00016  * ERSP_FILES  - A comma separated list of which files names to
00017  *            emit log messages from.
00018  */
00019 
00020 #undef LOG_ERR
00021 #undef LOG_WARN
00022 #undef LOG_INFO
00023 #undef LOG_DBG
00024 
00025 #define LOG_ERR(args...)   ersp_log("error", __FILE__, __LINE__, args)
00026 #define LOG_WARN(args...)  ersp_log("warn", __FILE__, __LINE__, args)
00027 #define LOG_INFO(args...)  ersp_log("info", __FILE__, __LINE__, args)
00028 #define LOG_DBG(args...)   ersp_log("debug", __FILE__, __LINE__, args)
00029 
00030 void ersp_log(char *msg, char *file, int line, char *fmt, ...);
00031 
00032 #endif

Generated on Sat Jan 13 03:11:09 2007 for ERSP Player driver by  doxygen 1.5.1