aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/library.h
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-10-18 11:46:13 +0000
committerMartin Willi <martin@strongswan.org>2006-10-18 11:46:13 +0000
commit60356f3375da67375e48691bb1d732c02d1681a1 (patch)
tree1bfa3bd28d46c4211a17a831094e7fcbceea8bb6 /src/libstrongswan/library.h
parent8cdce67afa4bc4b4ff1a05e956db08cddc5dc48e (diff)
downloadstrongswan-60356f3375da67375e48691bb1d732c02d1681a1.tar.bz2
strongswan-60356f3375da67375e48691bb1d732c02d1681a1.tar.xz
introduced new logging subsystem using bus:
passive listeners can register on the bus active listeners wait for signals actively multiplexing allows multiple listeners to receive debug signals a lot more...
Diffstat (limited to 'src/libstrongswan/library.h')
-rw-r--r--src/libstrongswan/library.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/libstrongswan/library.h b/src/libstrongswan/library.h
index 00472bde9..58cd4bb33 100644
--- a/src/libstrongswan/library.h
+++ b/src/libstrongswan/library.h
@@ -84,17 +84,25 @@
*
* Symmetric signing algorithms,
* used to ensure message integrity.
- *
+ *
* @ingroup crypto
*/
-
+
/**
* @defgroup utils utils
- *
+ *
* Generic helper classes.
- *
+ *
* @ingroup libstrongswan
*/
+/** debug macros, they call the dbg function hook */
+#define DBG1(fmt, ...) dbg(1, fmt, ##__VA_ARGS__)
+#define DBG2(fmt, ...) dbg(2, fmt, ##__VA_ARGS__)
+#define DBG3(fmt, ...) dbg(3, fmt, ##__VA_ARGS__)
+#define DBG4(fmt, ...) dbg(4, fmt, ##__VA_ARGS__)
+
+/** dbg function hook, uses stderr logger by default */
+extern void (*dbg) (int level, char *fmt, ...);
#endif /* LIBRARY_H_ */