41 #include "upnpconfig.h"
70 typedef enum Upnp_Module
83 typedef enum Upnp_LogLevel_e
97 #define UPNP_PACKET UPNP_ERROR
102 #define UPNP_DEFAULT_LOG_LEVEL UPNP_ALL
111 #if defined NDEBUG && !defined UPNP_DEBUG_C
112 #define UpnpInitLog UpnpInitLog_Inlined
120 Upnp_LogLevel log_level);
122 #if defined NDEBUG && !defined UPNP_DEBUG_C
123 #define UpnpSetLogLevel UpnpSetLogLevel_Inlined
124 static UPNP_INLINE void UpnpSetLogLevel_Inlined(Upnp_LogLevel log_level)
136 #if defined NDEBUG && !defined UPNP_DEBUG_C
137 #define UpnpCloseLog UpnpCloseLog_Inlined
138 static UPNP_INLINE void UpnpCloseLog_Inlined(
void) {}
148 const char *fileName,
150 const char *Ignored);
152 #if defined NDEBUG && !defined UPNP_DEBUG_C
153 #define UpnpSetLogFileNames UpnpSetLogFileNames_Inlined
154 static UPNP_INLINE void UpnpSetLogFileNames_Inlined(
155 const char *ErrFileName,
const char *ignored)
177 #if defined NDEBUG && !defined UPNP_DEBUG_C
178 #define UpnpGetDebugFile UpnpGetDebugFile_Inlined
180 Upnp_LogLevel level, Dbg_Module module)
195 Upnp_LogLevel DLevel,
199 const char *DbgFileName,
210 __attribute__((format(__printf__, 5, 6)))
214 #if defined NDEBUG && !defined UPNP_DEBUG_C
215 #define UpnpPrintf UpnpPrintf_Inlined
227 static UPNP_INLINE void UpnpPrintf_Inlined(Upnp_LogLevel DLevel,
229 const char *DbgFileName,
Defines constants that for some reason are not defined on some systems.
#define UPNP_EXPORT_SPEC
Export functions on WIN32 DLLs.
Definition: UpnpGlobal.h:105
#define UPNP_INLINE
Declares an inline function.
Definition: UpnpGlobal.h:119
#define UPNP_E_SUCCESS
The operation completed successfully.
Definition: upnp.h:97
FILE * UpnpGetDebugFile(Upnp_LogLevel level, Dbg_Module module)
Check if the module is turned on for debug and returns the file descriptor corresponding to the debug...
Definition: upnpdebug.c:295
void UpnpSetLogLevel(Upnp_LogLevel log_level)
Set the log level (see Upnp_LogLevel).
Definition: upnpdebug.c:114
void UpnpSetLogFileNames(const char *fileName, const char *Ignored)
Set the name for the log file. There used to be 2 separate files. The second parameter has been kept ...
Definition: upnpdebug.c:141
void UpnpCloseLog(void)
Closes the log files.
Definition: upnpdebug.c:120
int UpnpInitLog(void)
Initialize the log files.
Definition: upnpdebug.c:71
void UpnpPrintf(Upnp_LogLevel DLevel, Dbg_Module Module, const char *DbgFileName, int DbgLineNo, const char *FmtStr,...)
Prints the debug statement either on the standard output or log file along with the information from ...
Definition: upnpdebug.c:259