43 #include "upnpconfig.h"
77 typedef enum Upnp_Module {
90 typedef enum Upnp_LogLevel_e {
102 #define UPNP_DEFAULT_LOG_LEVEL UPNP_ALL
127 Upnp_LogLevel log_level);
149 const char *ErrFileName,
151 const char *InfoFileName);
154 const char *ErrFileName,
155 const char *InfoFileName) {}
190 Upnp_LogLevel DLevel,
195 Upnp_LogLevel DLevel,
211 Upnp_LogLevel DLevel,
215 const char* DbgFileName,
225 __attribute__((format (__printf__, 5, 6)))
230 Upnp_LogLevel DLevel,
232 const char* DbgFileName,
250 const char *DbgFileName,
256 const char *DbgFileName,
291 const char *DbgFileName,
299 const char *DbgFileName,
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:148
int UpnpInitLog(void)
Initialize the log files.
Definition: upnpdebug.c:71
void PrintThreadPoolStats(ThreadPool *tp, const char *DbgFileName, int DbgLineNo, const char *msg)
Prints thread pool statistics.
Definition: upnpdebug.c:240
#define UPNP_E_SUCCESS
The operation completed successfully.
Definition: upnp.h:119
A thread pool similar to the thread pool in the UPnP SDK.
Definition: ThreadPool.h:266
void UpnpDisplayBanner(FILE *fd, const char **lines, size_t size, int starlength)
Writes the buffer in the file as per the requested banner.
void UpnpSetLogFileNames(const char *ErrFileName, const char *InfoFileName)
Set the name for error and information files, respectively.
Definition: upnpdebug.c:108
void UpnpSetLogLevel(Upnp_LogLevel log_level)
Set the log level (see Upnp_LogLevel).
Definition: upnpdebug.c:86
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:191
void UpnpDisplayFileAndLine(FILE *fd, const char *DbgFileName, int DbgLineNo)
Writes the file name and file number from where debug statement is coming to the log file...
Definition: upnpdebug.c:211
int DebugAtThisLevel(Upnp_LogLevel DLevel, Dbg_Module Module)
Returns true if debug output should be done in this module.
Definition: upnpdebug.c:129
void UpnpCloseLog(void)
Closes the log files.
Definition: upnpdebug.c:92
#define UPNP_INLINE
Declares an inline function.
Definition: UpnpGlobal.h:91
Defines constants that for some reason are not defined on some systems.