aboutsummaryrefslogtreecommitdiff
path: root/src/common/log.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-03 18:27:19 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-03 18:27:19 +0000
commit11979dc1f5fae74df8fba8c339f0ac5ee4c52796 (patch)
tree1475a888a00ef3bb492bf54bd4c4f2a05235d841 /src/common/log.h
parent4fdaa5de51f6dbe6c56545553c617fc40eabf138 (diff)
downloadtor-11979dc1f5fae74df8fba8c339f0ac5ee4c52796.tar
tor-11979dc1f5fae74df8fba8c339f0ac5ee4c52796.tar.gz
Add a callback log handler type
svn:r2658
Diffstat (limited to 'src/common/log.h')
-rw-r--r--src/common/log.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/log.h b/src/common/log.h
index 55dabafaa..10e6c87dc 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);