diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-03 18:27:19 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-03 18:27:19 +0000 |
commit | 11979dc1f5fae74df8fba8c339f0ac5ee4c52796 (patch) | |
tree | 1475a888a00ef3bb492bf54bd4c4f2a05235d841 /src/common/log.h | |
parent | 4fdaa5de51f6dbe6c56545553c617fc40eabf138 (diff) | |
download | tor-11979dc1f5fae74df8fba8c339f0ac5ee4c52796.tar.gz tor-11979dc1f5fae74df8fba8c339f0ac5ee4c52796.zip |
Add a callback log handler type
svn:r2658
Diffstat (limited to 'src/common/log.h')
-rw-r--r-- | src/common/log.h | 3 |
1 files changed, 3 insertions, 0 deletions
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); |