From 11979dc1f5fae74df8fba8c339f0ac5ee4c52796 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 3 Nov 2004 18:27:19 +0000 Subject: Add a callback log handler type svn:r2658 --- src/common/log.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/common/log.h') diff --git a/src/common/log.h b/src/common/log.h index 55dabafaaa..10e6c87dc6 100644 --- a/src/common/log.h +++ b/src/common/log.h @@ -53,12 +53,15 @@ #define LOG_ERR 3 #endif +typedef void (*log_callback)(int severity, const char *msg); + int parse_log_level(const char *level); void add_stream_log(int severityMin, int severityMax, const char *name, FILE *stream); int add_file_log(int severityMin, int severityMax, const char *filename); #ifdef HAVE_SYSLOG_H int add_syslog_log(int loglevelMin, int loglevelMax); #endif +int add_callback_log(int loglevelMin, int loglevelMax, log_callback cb); int get_min_log_level(void); void close_logs(void); void reset_logs(void); -- cgit v1.2.3-54-g00ecf