41 #include "upnpconfig.h" 72 typedef enum Upnp_Module {
84 typedef enum Upnp_LogLevel_e {
95 #define UPNP_DEFAULT_LOG_LEVEL UPNP_ALL 116 Upnp_LogLevel log_level);
121 log_level = log_level;
142 const char *ErrFileName,
144 const char *InfoFileName);
147 const char *InfoFileName)
150 ErrFileName = ErrFileName;
151 InfoFileName = InfoFileName;
187 Upnp_LogLevel DLevel,
207 Upnp_LogLevel DLevel,
211 const char *DbgFileName,
221 __attribute__ ((format(__printf__, 5, 6)))
226 const char *DbgFileName,
int DbgLineNo,
const char *FmtStr, ...)
231 DbgFileName = DbgFileName;
232 DbgLineNo = DbgLineNo;
247 const char *DbgFileName,
252 const char *DbgFileName,
int DbgLineNo)
256 DbgFileName = DbgFileName;
257 DbgLineNo = DbgLineNo;
276 size_t size,
int starlength)
282 starlength = starlength;
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:126
int UpnpInitLog(void)
Initialize the log files.
Definition: upnpdebug.c:68
#define UPNP_E_SUCCESS
The operation completed successfully.
Definition: upnp.h:97
void UpnpSetLogFileNames(const char *ErrFileName, const char *InfoFileName)
Set the name for error and information files, respectively.
Definition: upnpdebug.c:100
void UpnpDisplayBanner(FILE *fd, const char **lines, size_t size, size_t starlength)
Writes the buffer in the file as per the requested banner.
Definition: upnpdebug.c:201
void UpnpSetLogLevel(Upnp_LogLevel log_level)
Set the log level (see Upnp_LogLevel).
Definition: upnpdebug.c:84
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 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:174
int DebugAtThisLevel(Upnp_LogLevel DLevel, Dbg_Module Module)
Returns true if debug output should be done in this module.
Definition: upnpdebug.c:110
void UpnpCloseLog(void)
Closes the log files.
Definition: upnpdebug.c:89
#define UPNP_INLINE
Declares an inline function.
Definition: UpnpGlobal.h:93
Defines constants that for some reason are not defined on some systems.