00001 #ifndef VERBOSEDEFS_H_
00002 #define VERBOSEDEFS_H_
00003
00004 #include <stdint.h>
00005
00024
00025 #undef VERBOSE_PREAMBLE
00026 #undef VERBOSE_POSTAMBLE
00027 #undef VERBOSE_MAP
00028
00029 #undef LOGLEVEL_PREAMBLE
00030 #undef LOGLEVEL_POSTAMBLE
00031 #undef LOGLEVEL_MAP
00032
00033 #ifdef _IMPLEMENT_VERBOSE
00034
00035
00036 #define VERBOSE_PREAMBLE
00037 #define VERBOSE_POSTAMBLE
00038 #define VERBOSE_MAP(name,mask,additive,help) \
00039 verboseAdd((uint64_t)(mask),QString(#name),(bool)(additive),QString(help));
00040
00041 #define LOGLEVEL_PREAMBLE
00042 #define LOGLEVEL_POSTAMBLE
00043 #define LOGLEVEL_MAP(name,value,shortname) \
00044 loglevelAdd((int)(value),QString(#name),(char)(shortname));
00045
00046 #else // !defined(_IMPLEMENT_VERBOSE)
00047
00048
00049 #define VERBOSE_PREAMBLE \
00050 enum VerboseMask {
00051 #define VERBOSE_POSTAMBLE \
00052 VB_LAST_ITEM \
00053 };
00054 #define VERBOSE_MAP(name,mask,additive,help) \
00055 name = (uint64_t)(mask),
00056
00057 #define LOGLEVEL_PREAMBLE \
00058 typedef enum {
00059 #define LOGLEVEL_POSTAMBLE \
00060 } LogLevel_t;
00061 #define LOGLEVEL_MAP(name,value,shortname) \
00062 name = (int)(value),
00063
00064 #endif
00065
00066 VERBOSE_PREAMBLE
00067 VERBOSE_MAP(VB_ALL, ~0ULL, false,
00068 "ALL available debug output")
00069 VERBOSE_MAP(VB_MOST, 0xffffffff3ffeffffULL, false,
00070 "Most debug (nodatabase,notimestamp,noextra)")
00071 #if 0
00072 VERBOSE_MAP(VB_IMPORTANT, 0x00000001, false,
00073 "Errors or other very important messages")
00074 #endif
00075 VERBOSE_MAP(VB_GENERAL, 0x00000002, true,
00076 "General info")
00077 VERBOSE_MAP(VB_RECORD, 0x00000004, true,
00078 "Recording related messages")
00079 VERBOSE_MAP(VB_PLAYBACK, 0x00000008, true,
00080 "Playback related messages")
00081 VERBOSE_MAP(VB_CHANNEL, 0x00000010, true,
00082 "Channel related messages")
00083 VERBOSE_MAP(VB_OSD, 0x00000020, true,
00084 "On-Screen Display related messages")
00085 VERBOSE_MAP(VB_FILE, 0x00000040, true,
00086 "File and AutoExpire related messages")
00087 VERBOSE_MAP(VB_SCHEDULE, 0x00000080, true,
00088 "Scheduling related messages")
00089 VERBOSE_MAP(VB_NETWORK, 0x00000100, true,
00090 "Network protocol related messages")
00091 VERBOSE_MAP(VB_COMMFLAG, 0x00000200, true,
00092 "Commercial detection related messages")
00093 VERBOSE_MAP(VB_AUDIO, 0x00000400, true,
00094 "Audio related messages")
00095 VERBOSE_MAP(VB_LIBAV, 0x00000800, true,
00096 "Enables libav debugging")
00097 VERBOSE_MAP(VB_JOBQUEUE, 0x00001000, true,
00098 "JobQueue related messages")
00099 VERBOSE_MAP(VB_SIPARSER, 0x00002000, true,
00100 "Siparser related messages")
00101 VERBOSE_MAP(VB_EIT, 0x00004000, true,
00102 "EIT related messages")
00103 VERBOSE_MAP(VB_VBI, 0x00008000, true,
00104 "VBI related messages")
00105 VERBOSE_MAP(VB_DATABASE, 0x00010000, true,
00106 "Display all SQL commands executed")
00107 VERBOSE_MAP(VB_DSMCC, 0x00020000, true,
00108 "DSMCC carousel related messages")
00109 VERBOSE_MAP(VB_MHEG, 0x00040000, true,
00110 "MHEG debugging messages")
00111 VERBOSE_MAP(VB_UPNP, 0x00080000, true,
00112 "UPnP debugging messages")
00113 VERBOSE_MAP(VB_SOCKET, 0x00100000, true,
00114 "socket debugging messages")
00115 VERBOSE_MAP(VB_XMLTV, 0x00200000, true,
00116 "xmltv output and related messages")
00117 VERBOSE_MAP(VB_DVBCAM, 0x00400000, true,
00118 "DVB CAM debugging messages")
00119 VERBOSE_MAP(VB_MEDIA, 0x00800000, true,
00120 "Media Manager debugging messages")
00121 VERBOSE_MAP(VB_IDLE, 0x01000000, true,
00122 "System idle messages")
00123 VERBOSE_MAP(VB_CHANSCAN, 0x02000000, true,
00124 "Channel Scanning messages")
00125 VERBOSE_MAP(VB_GUI, 0x04000000, true,
00126 "GUI related messages")
00127 VERBOSE_MAP(VB_SYSTEM, 0x08000000, true,
00128 "External executable related messages")
00129 #if 0
00130 VERBOSE_MAP(VB_EXTRA, 0x40000000, true,
00131 "More detailed messages in selected levels")
00132 #endif
00133 VERBOSE_MAP(VB_TIMESTAMP, 0x80000000, true,
00134 "Conditional data driven messages")
00135 VERBOSE_MAP(VB_PROCESS, 0x100000000ULL, true,
00136 "MPEG2Fix processing messages")
00137 VERBOSE_MAP(VB_FRAME, 0x200000000ULL, true,
00138 "MPEG2Fix frame messages")
00139 VERBOSE_MAP(VB_RPLXQUEUE, 0x400000000ULL, true,
00140 "MPEG2Fix Replex Queue messages")
00141 VERBOSE_MAP(VB_DECODE, 0x800000000ULL, true,
00142 "MPEG2Fix Decode messages")
00143 VERBOSE_MAP(VB_FLUSH, 0x1000000000ULL, true,
00144 "")
00145
00146
00147
00148
00149
00150 VERBOSE_MAP(VB_STDIO, 0x2000000000ULL, true,
00151 "")
00152
00153
00154
00155
00156
00157 VERBOSE_MAP(VB_GPU, 0x4000000000ULL, true,
00158 "GPU Commercial Flagging messages")
00159 VERBOSE_MAP(VB_GPUAUDIO, 0x8000000000ULL, true,
00160 "GPU Audio Processing messages")
00161 VERBOSE_MAP(VB_GPUVIDEO, 0x10000000000ULL, true,
00162 "GPU Video Processing messages")
00163 VERBOSE_MAP(VB_REFCOUNT, 0x20000000000ULL, true,
00164 "Reference Count messages")
00165 VERBOSE_MAP(VB_NONE, 0x00000000, false,
00166 "NO debug output")
00167 VERBOSE_POSTAMBLE
00168
00169
00170 LOGLEVEL_PREAMBLE
00171 LOGLEVEL_MAP(LOG_ANY, -1, ' ')
00172 LOGLEVEL_MAP(LOG_EMERG, 0, '!')
00173 LOGLEVEL_MAP(LOG_ALERT, 1, 'A')
00174 LOGLEVEL_MAP(LOG_CRIT, 2, 'C')
00175 LOGLEVEL_MAP(LOG_ERR, 3, 'E')
00176 LOGLEVEL_MAP(LOG_WARNING, 4, 'W')
00177 LOGLEVEL_MAP(LOG_NOTICE, 5, 'N')
00178 LOGLEVEL_MAP(LOG_INFO, 6, 'I')
00179 LOGLEVEL_MAP(LOG_DEBUG, 7, 'D')
00180 LOGLEVEL_MAP(LOG_UNKNOWN, 8, '-')
00181 LOGLEVEL_POSTAMBLE
00182
00183 #endif