summaryrefslogtreecommitdiff
path: root/src/common/log.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-09-16 17:58:36 +0000
committerNick Mathewson <nickm@torproject.org>2003-09-16 17:58:36 +0000
commit7711c2e7457576084da7d68913573cafde87d853 (patch)
tree57fdb8e4a5be9b9588dc13bce3e5b162ed0393b3 /src/common/log.h
parentc09de55fb843c2875caf59cc6447f184d51ce209 (diff)
downloadtor-7711c2e7457576084da7d68913573cafde87d853.tar.gz
tor-7711c2e7457576084da7d68913573cafde87d853.zip
Add backend support for multiple logfiles, including console logs.
Also optimize logging by formatting messages in memory before sending them through stdio. (It turns out (according to gprof) that logging performance matters.) svn:r463
Diffstat (limited to 'src/common/log.h')
-rw-r--r--src/common/log.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/log.h b/src/common/log.h
index 38f330c081..9b9d072eec 100644
--- a/src/common/log.h
+++ b/src/common/log.h
@@ -30,6 +30,11 @@
void log_set_severity(int severity);
+void add_stream_log(int loglevel, const char *name, FILE *stream);
+void add_file_log(int severity, const char *filename);
+void close_logs();
+void reset_logs();
+
/* Outputs a message to stdout */
void log(int severity, const char *format, ...) CHECK_PRINTF(2,3);