aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-05-21 12:38:52 +0000
committerRoger Dingledine <arma@torproject.org>2004-05-21 12:38:52 +0000
commitf875db1821ba675c9e53ca100374403e9d0462d1 (patch)
treee7b707b5a152905e13acb21cdba14efd9ba05c1b /src/common
parentc278ff3bc275bc6218fd2e1b1009a187ad851517 (diff)
downloadtor-f875db1821ba675c9e53ca100374403e9d0462d1.tar
tor-f875db1821ba675c9e53ca100374403e9d0462d1.tar.gz
it looks like parse_log_level() was never taught about WARN?
svn:r1917
Diffstat (limited to 'src/common')
-rw-r--r--src/common/log.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/common/log.c b/src/common/log.c
index 1b77cc49a..f3c7281b1 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -225,14 +225,15 @@ int add_file_log(int loglevelMin, int loglevelMax, const char *filename)
int parse_log_level(const char *level) {
if (!strcasecmp(level, "err"))
return LOG_ERR;
- else if (!strcasecmp(level, "notice"))
+ if (!strcasecmp(level, "warn"))
+ return LOG_WARN;
+ if (!strcasecmp(level, "notice"))
return LOG_NOTICE;
- else if (!strcasecmp(level, "info"))
+ if (!strcasecmp(level, "info"))
return LOG_INFO;
- else if (!strcasecmp(level, "debug"))
+ if (!strcasecmp(level, "debug"))
return LOG_DEBUG;
- else
- return -1;
+ return -1;
}
int get_min_log_level(void)