The cost of this is relatively small, since the number of packages compared to classes is relatively small.
This feature allows extensions of the JULI framework to change log categories during run time, as opposed to changing them for every single logger in a category
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@752215
13f79535-47bb-0310-9956-
ffa450edef68
}
}
- // If any parent loggers have levels definied, make sure they are
- // instantiated
+ // Always instantiate parent loggers so that
+ // we can control log categories even during runtime
int dotIndex = loggerName.lastIndexOf('.');
while (dotIndex >= 0) {
final String parentName = loggerName.substring(0, dotIndex);
- if (getProperty(parentName + ".level") != null) {
- Logger.getLogger(parentName);
- break;
- }
+ Logger.getLogger(parentName);
dotIndex = loggerName.lastIndexOf('.', dotIndex - 1);
}