Skip to content

Commit d120bd9

Browse files
committed
Make the log levels cumulative
That is, the `debug` level should imply all the prior levels (`info`, `warning`, `error`).
1 parent 8d36662 commit d120bd9

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/logging.cc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,21 @@ bool XrdHTTPServer::ConfigLog(XrdOucGatherConf &conf, XrdSysError &log) {
7070
} else if (!strcmp(val, "error")) {
7171
log.setMsgMask(log.getMsgMask() | LogMask::Error);
7272
} else if (!strcmp(val, "warning")) {
73-
log.setMsgMask(log.getMsgMask() | LogMask::Warning);
73+
log.setMsgMask(log.getMsgMask() | LogMask::Warning |
74+
LogMask::Error);
7475
} else if (!strcmp(val, "info")) {
75-
log.setMsgMask(log.getMsgMask() | LogMask::Info);
76+
log.setMsgMask(log.getMsgMask() | LogMask::Info | LogMask::Warning |
77+
LogMask::Error);
7678
} else if (!strcmp(val, "dump")) {
77-
log.setMsgMask(log.getMsgMask() | LogMask::Dump);
79+
log.setMsgMask(log.getMsgMask() | LogMask::Dump | LogMask::Debug |
80+
LogMask::Info | LogMask::Warning | LogMask::Error);
7881
} else if (!strcmp(val, "debug")) {
79-
log.setMsgMask(log.getMsgMask() | LogMask::Debug);
82+
log.setMsgMask(log.getMsgMask() | LogMask::Debug | LogMask::Info |
83+
LogMask::Warning | LogMask::Error);
8084
} else if (!strcmp(val, "none")) {
8185
log.setMsgMask(0);
8286
} else {
83-
log.Emsg("Config",
84-
"scitokens.trace encountered an unknown directive:", val);
87+
log.Emsg("Config", "trace encountered an unknown directive:", val);
8588
return false;
8689
}
8790
} while ((val = conf.GetToken()));

0 commit comments

Comments
 (0)