aboutsummaryrefslogtreecommitdiff
path: root/src/common/torlog.h
diff options
context:
space:
mode:
authorArlo Breault <arlolra@gmail.com>2014-03-23 09:24:26 -0700
committerNick Mathewson <nickm@torproject.org>2014-07-16 12:16:49 +0200
commit15e170e01b3f67325f952d0becda0438fa879907 (patch)
tree3c9f235db67491c0708a5fccfaf34cfa95ce548b /src/common/torlog.h
parent98541f2892335a5a512a6c01b2f2227bde1d649e (diff)
downloadtor-15e170e01b3f67325f952d0becda0438fa879907.tar.gz
tor-15e170e01b3f67325f952d0becda0438fa879907.zip
Add an option to overwrite logs
* Issue #5583
Diffstat (limited to 'src/common/torlog.h')
-rw-r--r--src/common/torlog.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/torlog.h b/src/common/torlog.h
index 34f70f3c00..34e39b4b94 100644
--- a/src/common/torlog.h
+++ b/src/common/torlog.h
@@ -130,7 +130,8 @@ void set_log_severity_config(int minSeverity, int maxSeverity,
log_severity_list_t *severity_out);
void add_stream_log(const log_severity_list_t *severity, const char *name,
int fd);
-int add_file_log(const log_severity_list_t *severity, const char *filename);
+int add_file_log(const log_severity_list_t *severity, const char *filename,
+ const int truncate);
#ifdef HAVE_SYSLOG_H
int add_syslog_log(const log_severity_list_t *severity);
#endif
@@ -148,6 +149,7 @@ void change_callback_log_severity(int loglevelMin, int loglevelMax,
void flush_pending_log_callbacks(void);
void log_set_application_name(const char *name);
void set_log_time_granularity(int granularity_msec);
+void truncate_logs(void);
void tor_log(int severity, log_domain_mask_t domain, const char *format, ...)
CHECK_PRINTF(3,4);