libnpupnp 4.1.0
An almost compatible successor for the Portable UPnP reference library
|
libnpupnp message log definitions More...
#include "UpnpGlobal.h"
#include "upnpconfig.h"
#include <stdio.h>
Go to the source code of this file.
Macros | |
#define | UPNP_DEFAULT_LOG_LEVEL UPNP_ERROR |
Typedefs | |
typedef enum Upnp_Module | Dbg_Module |
typedef enum Upnp_LogLevel | Upnp_LogLevel |
Log verbosity level, from UPNP_CRITICAL to UPNP_ALL, in increasing order of verbosity. | |
Enumerations | |
enum | Upnp_Module { SSDP , SOAP , GENA , TPOOL , MSERV , DOM , API , HTTP } |
enum | Upnp_LogLevel { UPNP_CRITICAL , UPNP_ERROR , UPNP_INFO , UPNP_DEBUG , UPNP_ALL } |
Log verbosity level, from UPNP_CRITICAL to UPNP_ALL, in increasing order of verbosity. More... | |
Functions | |
EXPORT_SPEC int | UpnpInitLog (void) |
Initialize the log output. Can be called before UpnpInit2. | |
EXPORT_SPEC void | UpnpSetLogLevel (Upnp_LogLevel log_level) |
Set the log verbosity level. | |
EXPORT_SPEC void | UpnpCloseLog (void) |
Closes the log output, if appropriate. | |
EXPORT_SPEC void | UpnpSetLogFileNames (const char *fileName, const char *Ignored) |
Set the name for the log file. You will then need to call UpnpInitLog to close the old file if needed, and open the new one. | |
EXPORT_SPEC FILE * | UpnpGetDebugFile (Upnp_LogLevel level, Dbg_Module module) |
Use the level/module to determine if a message should be emitted. | |
EXPORT_SPEC void | UpnpPrintf (Upnp_LogLevel DLevel, Dbg_Module Module, const char *DbgFileName, int DbgLineNo, const char *FmtStr,...) |
Prints the debug statement to the current output. | |
libnpupnp message log definitions
#define UPNP_DEFAULT_LOG_LEVEL UPNP_ERROR |
Default log level
typedef enum Upnp_Module Dbg_Module |
Describe the code area generating the message
enum Upnp_LogLevel |
Log verbosity level, from UPNP_CRITICAL to UPNP_ALL, in increasing order of verbosity.
enum Upnp_Module |
EXPORT_SPEC FILE * UpnpGetDebugFile | ( | Upnp_LogLevel | level, |
Dbg_Module | module | ||
) |
Use the level/module to determine if a message should be emitted.
[in] | level | The level of the debug logging. It will decide whether debug statement will go to standard output, or any of the log files. |
[in] | module | debug will go in the name of this module. |
EXPORT_SPEC int UpnpInitLog | ( | void | ) |
Initialize the log output. Can be called before UpnpInit2.
EXPORT_SPEC void UpnpPrintf | ( | Upnp_LogLevel | DLevel, |
Dbg_Module | Module, | ||
const char * | DbgFileName, | ||
int | DbgLineNo, | ||
const char * | FmtStr, | ||
... | |||
) |
Prints the debug statement to the current output.
[in] | DLevel | Message level, to be compared to the current verbosity. |
[in] | Module | Emitting code area. |
[in] | DbgFileName | Source file name (usually FILE). |
[in] | DbgLineNo | Source line number (usually LINE). |
[in] | FmtStr | Printf-like format specification. |
[in] | ... | Printf-like arguments. |
EXPORT_SPEC void UpnpSetLogFileNames | ( | const char * | fileName, |
const char * | Ignored | ||
) |
Set the name for the log file. You will then need to call UpnpInitLog to close the old file if needed, and open the new one.
[in] | fileName | Name of the log file. NULL or empty to use stderr. |
Ignored | Ignored, used to be a second file. |
EXPORT_SPEC void UpnpSetLogLevel | ( | Upnp_LogLevel | log_level | ) |
Set the log verbosity level.
[in] | log_level | Log level. |