diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-04-05 22:56:17 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-04-05 22:56:17 +0000 |
commit | 499129093599f2395331c53fc2b911ed66b97a22 (patch) | |
tree | e855bdd2feccc22a73c9546ddd5ae855bcbd7a45 /src/common/log.c | |
parent | 46be0fa99915608d823ac6b82356f60ea7e5fc1d (diff) | |
download | tor-499129093599f2395331c53fc2b911ed66b97a22.tar.gz tor-499129093599f2395331c53fc2b911ed66b97a22.zip |
Revise control spec and implementation to allow all log messages to be sent to controller with their severities intact.
svn:r4010
Diffstat (limited to 'src/common/log.c')
-rw-r--r-- | src/common/log.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/log.c b/src/common/log.c index 863f18b69f..ce33810a63 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -373,6 +373,18 @@ int add_callback_log(int loglevelMin, int loglevelMax, log_callback cb) return 0; } +void change_callback_log_severity(int loglevelMin, int loglevelMax, + log_callback cb) +{ + logfile_t *lf; + for (lf = logfiles; lf; lf = lf->next) { + if (lf->callback == cb) { + lf->loglevel = loglevelMin; + lf->max_loglevel = loglevelMax; + } + } +} + /** Close any log handlers added by add_temp_log or marked by mark_logs_temp */ void close_temp_logs(void) { |