diff options
author | methodus <methodus@web.de> | 2012-12-30 14:13:25 +0100 |
---|---|---|
committer | methodus <methodus@web.de> | 2012-12-30 14:13:25 +0100 |
commit | c55ace1b1cc9a9b27e3da5ca55bb7c93b41142cd (patch) | |
tree | 8f69f2ad5733de5e0be17a9cec21bc5ce6bb555c /include | |
parent | a758404f2a9c7f1b05b437cf776d691156ce1d09 (diff) | |
download | vdr-plugin-upnp-c55ace1b1cc9a9b27e3da5ca55bb7c93b41142cd.tar.gz vdr-plugin-upnp-c55ace1b1cc9a9b27e3da5ca55bb7c93b41142cd.tar.bz2 |
Added debug flag for more detailed debugging information. Removed some output from regular logging
Diffstat (limited to 'include')
-rw-r--r-- | include/tools.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/tools.h b/include/tools.h index 966040d..e640da5 100644 --- a/include/tools.h +++ b/include/tools.h @@ -32,6 +32,23 @@ using namespace std; #define _unused(x) ((void)x) +#ifdef DEBUG + +#if __STDC_VERSION__ < 199901L + #if __GNUC__ >= 2 + #define __func__ __PRETTY_FUNCTION__ + #else + #define __func__ "<unknown>" + #endif +#endif + +#define LOG(level, msg...) upnp::log_debug_msg(__FILE__, __func__, __LINE__, level, msg); + +namespace upnp { + void log_debug_msg(const char* file, const char* func, int line, int level, const char* msg, ...) __attribute__ ((format (printf, 5, 6))); +} +#endif + namespace upnp { typedef std::list<std::string> StringList; |