summaryrefslogtreecommitdiff
path: root/modules/debugging
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2010-02-01 23:27:32 +0000
committerStefan Fritsch <sf@apache.org>2010-02-01 23:27:32 +0000
commit60821a3b74716b9e08f1b66a1a48bc65bfa2ea3e (patch)
tree1a398628773f31587768e63cead26467098f4744 /modules/debugging
parent5314f77c08038c37d8226b0d351a2cc80cc8719f (diff)
downloadhttpd-60821a3b74716b9e08f1b66a1a48bc65bfa2ea3e.tar.gz
replace duplicate code with new function ap_parse_log_level()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@905454 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/debugging')
-rw-r--r--modules/debugging/mod_dumpio.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/modules/debugging/mod_dumpio.c b/modules/debugging/mod_dumpio.c
index 56a34ae8cf..209be72ff0 100644
--- a/modules/debugging/mod_dumpio.c
+++ b/modules/debugging/mod_dumpio.c
@@ -244,34 +244,9 @@ static const char *set_loglevel(cmd_parms *cmd, void *dummy, const char *arg)
}
if ((str = ap_getword_conf(cmd->pool, &arg))) {
- if (!strcasecmp(str, "emerg")) {
- ptr->loglevel = APLOG_EMERG;
- }
- else if (!strcasecmp(str, "alert")) {
- ptr->loglevel = APLOG_ALERT;
- }
- else if (!strcasecmp(str, "crit")) {
- ptr->loglevel = APLOG_CRIT;
- }
- else if (!strcasecmp(str, "error")) {
- ptr->loglevel = APLOG_ERR;
- }
- else if (!strcasecmp(str, "warn")) {
- ptr->loglevel = APLOG_WARNING;
- }
- else if (!strcasecmp(str, "notice")) {
- ptr->loglevel = APLOG_NOTICE;
- }
- else if (!strcasecmp(str, "info")) {
- ptr->loglevel = APLOG_INFO;
- }
- else if (!strcasecmp(str, "debug")) {
- ptr->loglevel = APLOG_DEBUG;
- }
- else {
- return "DumpIOLogLevel requires level keyword: one of "
- "emerg/alert/crit/error/warn/notice/info/debug";
- }
+ err = ap_parse_log_level(str, &ptr->loglevel);
+ if (err != NULL)
+ return err;
}
else {
return "DumpIOLogLevel requires level keyword";