41#include "upnpconfig.h"
70typedef enum Upnp_Module
83typedef enum Upnp_LogLevel_e
99#define UPNP_PACKET UPNP_ERROR
104#define UPNP_DEFAULT_LOG_LEVEL UPNP_ALL
113#if defined NDEBUG && !defined UPNP_DEBUG_C
114 #define UpnpInitLog UpnpInitLog_Inlined
122 Upnp_LogLevel log_level);
124#if defined NDEBUG && !defined UPNP_DEBUG_C
125 #define UpnpSetLogLevel UpnpSetLogLevel_Inlined
126static UPNP_INLINE void UpnpSetLogLevel_Inlined(Upnp_LogLevel log_level)
138#if defined NDEBUG && !defined UPNP_DEBUG_C
139 #define UpnpCloseLog UpnpCloseLog_Inlined
140static UPNP_INLINE void UpnpCloseLog_Inlined(
void) {}
150 const char *fileName,
152 const char *Ignored);
154#if defined NDEBUG && !defined UPNP_DEBUG_C
155 #define UpnpSetLogFileNames UpnpSetLogFileNames_Inlined
156static UPNP_INLINE void UpnpSetLogFileNames_Inlined(
157 const char *ErrFileName,
const char *ignored)
179#if defined NDEBUG && !defined UPNP_DEBUG_C
180 #define UpnpGetDebugFile UpnpGetDebugFile_Inlined
182 Upnp_LogLevel level, Dbg_Module module)
197 Upnp_LogLevel DLevel,
201 const char *DbgFileName,
212 __attribute__((format(__printf__, 5, 6)))
216#if defined NDEBUG && !defined UPNP_DEBUG_C
217 #define UpnpPrintf UpnpPrintf_Inlined
229static UPNP_INLINE void UpnpPrintf_Inlined(Upnp_LogLevel DLevel,
231 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
void UpnpSetLogLevel(Upnp_LogLevel log_level)
Set the log level (see Upnp_LogLevel).
Definition upnpdebug.c:114
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 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