00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __XMMS_LOG_H__
00021 #define __XMMS_LOG_H__
00022
00023 #include <glib.h>
00024 #include <xmmsc/xmmsc_util.h>
00025
00026 #define xmms_log_debug g_debug
00027
00028 #define DEBUG
00029
00030 #ifndef _MSC_VER
00031 #ifdef DEBUG
00032 #define XMMS_DBG(fmt, ...) xmms_log_debug (__FILE__ ":" XMMS_STRINGIFY(__LINE__) ": " fmt, ## __VA_ARGS__)
00033 #define xmms_log_fatal(fmt, ...) g_error (__FILE__ ":" XMMS_STRINGIFY(__LINE__) ": " fmt, ## __VA_ARGS__)
00034 #define xmms_log_info(fmt, ...) g_message (__FILE__ ":" XMMS_STRINGIFY(__LINE__) ": " fmt, ## __VA_ARGS__)
00035 #define xmms_log_error(fmt, ...) g_warning (__FILE__ ":" XMMS_STRINGIFY(__LINE__) ": " fmt, ## __VA_ARGS__)
00036 #else
00037 #define XMMS_DBG(fmt, ...)
00038 #define xmms_log_fatal g_error
00039 #define xmms_log_error g_warning
00040 #define xmms_log_info g_message
00041 #endif
00042 #endif
00043
00044 #endif
00045
00046