diff options
Diffstat (limited to 'src/libstrongswan/debug.h')
-rw-r--r-- | src/libstrongswan/debug.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/libstrongswan/debug.h b/src/libstrongswan/debug.h index 1413ff54e..085795acb 100644 --- a/src/libstrongswan/debug.h +++ b/src/libstrongswan/debug.h @@ -12,7 +12,7 @@ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. */ - + /** * @defgroup debug debug * @{ @ingroup libstrongswan @@ -21,6 +21,8 @@ #ifndef DEBUG_H_ #define DEBUG_H_ +#include <stdio.h> + #ifndef DEBUG_LEVEL # define DEBUG_LEVEL 4 #endif /* DEBUG_LEVEL */ @@ -52,10 +54,16 @@ # define DBG4(...) {} #endif -/** dbg function hook, uses stderr logger by default */ +/** dbg function hook, uses dbg_default() by default */ extern void (*dbg) (int level, char *fmt, ...); -/** default logging function, prints to stderr */ +/** default logging function */ void dbg_default(int level, char *fmt, ...); +/** set the level logged by dbg_default() */ +void dbg_default_set_level(int level); + +/** set the stream logged by dbg_default() to */ +void dbg_default_set_stream(FILE *stream); + #endif /** DEBUG_H_ @}*/ |