40#include "upnpconfig.h"
71typedef enum Upnp_Module {
83typedef enum Upnp_LogLevel_e {
94#define UPNP_DEFAULT_LOG_LEVEL UPNP_ALL
115 Upnp_LogLevel log_level);
120 log_level = log_level;
141 const char *ErrFileName,
143 const char *InfoFileName);
146 const char *InfoFileName)
149 ErrFileName = ErrFileName;
150 InfoFileName = InfoFileName;
186 Upnp_LogLevel DLevel,
206 Upnp_LogLevel DLevel,
210 const char *DbgFileName,
220 __attribute__ ((format(__printf__, 5, 6)))
225 const char *DbgFileName,
int DbgLineNo,
const char *FmtStr, ...)
230 DbgFileName = DbgFileName;
231 DbgLineNo = DbgLineNo;
246 const char *DbgFileName,
251 const char *DbgFileName,
int DbgLineNo)
255 DbgFileName = DbgFileName;
256 DbgLineNo = DbgLineNo;
275 size_t size,
int starlength)
281 starlength = starlength;
Defines constants that for some reason are not defined on some systems.
#define UPNP_INLINE
Declares an inline function.
Definition UpnpGlobal.h:99
#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:85
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...
void UpnpSetLogFileNames(const char *ErrFileName, const char *InfoFileName)
Set the name for error and information files, respectively.
Definition upnpdebug.c:101
int DebugAtThisLevel(Upnp_LogLevel DLevel, Dbg_Module Module)
Returns true if debug output should be done in this module.
Definition upnpdebug.c:111
void UpnpCloseLog(void)
Closes the log files.
Definition upnpdebug.c:90
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:176
int UpnpInitLog(void)
Initialize the log files.
Definition upnpdebug.c:69
void UpnpDisplayBanner(FILE *fd, const char **lines, size_t size, size_t starlength)
Writes the buffer in the file as per the requested banner.
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:127