* use String.replaceAll() rather than String.replaceFirst() to sanitize log names.

This commit is contained in:
hns 2007-12-12 15:32:10 +00:00
parent 29cebb79a9
commit 48bd6d055b

View file

@ -64,7 +64,7 @@ public class Logging extends LogFactory {
throw new LogConfigurationException("No logname specified!"); throw new LogConfigurationException("No logname specified!");
} }
// normalize log name // normalize log name
logname = logname.replaceFirst("[^\\w\\d\\.]", ""); logname = logname.replaceAll("[^\\w\\d\\.]", "");
if ("console".equals(logdir)) { if ("console".equals(logdir)) {
if (logname.startsWith("org.mortbay.")) if (logname.startsWith("org.mortbay."))
return getConsoleLog().getSedatedLog(); return getConsoleLog().getSedatedLog();