2087 final List<Logger> loggers = cxs.isEmpty()
2088 ? Collections.emptyList() : new ArrayList<>(cxs.size());
2089 for (Map.Entry<String, TreeSet<String>> e : loggerConfigs.entrySet()) {
2090 // This can be a logger name, or something else...
2091 // The only thing we know is that we found a property
2092 // we are interested in.
2093 // For instance, if we found x.y.z.level, then x.y.z could be
2094 // a logger, but it could also be a handler class...
2095 // Anyway...
2096 final String name = e.getKey();
2097 final Set<String> properties = e.getValue();
2098 loggers.clear();
2099 for (LoggerContext cx : cxs) {
2100 Logger l = cx.findLogger(name);
2101 if (l != null && !visited.test(l)) {
2102 loggers.add(l);
2103 }
2104 }
2105 if (loggers.isEmpty()) continue;
2106 for (String pk : properties) {
2107 ConfigProperty cp = ConfigProperty.find(pk).get();
2108 String p = previous.getProperty(pk, null);
2109 String n = next.getProperty(pk, null);
2110
2111 // Determines the type of modification.
2112 ModType mod = ModType.of(p, n);
2113
2114 // mod == SAME means that the two values are equals, there
2115 // is nothing to do. Usually, this should not happen as such
2116 // properties should have been filtered above.
2117 // It could happen however if the properties had
2118 // trailing/leading whitespaces.
2119 if (mod == ModType.SAME) continue;
2120
2121 switch (cp) {
2122 case LEVEL:
2123 if (mod == ModType.REMOVED) continue;
2124 Level level = Level.findLevel(trim(n));
2125 if (level != null) {
2126 if (name.isEmpty()) {
2127 rootLogger.setLevel(level);
|
2087 final List<Logger> loggers = cxs.isEmpty()
2088 ? Collections.emptyList() : new ArrayList<>(cxs.size());
2089 for (Map.Entry<String, TreeSet<String>> e : loggerConfigs.entrySet()) {
2090 // This can be a logger name, or something else...
2091 // The only thing we know is that we found a property
2092 // we are interested in.
2093 // For instance, if we found x.y.z.level, then x.y.z could be
2094 // a logger, but it could also be a handler class...
2095 // Anyway...
2096 final String name = e.getKey();
2097 final Set<String> properties = e.getValue();
2098 loggers.clear();
2099 for (LoggerContext cx : cxs) {
2100 Logger l = cx.findLogger(name);
2101 if (l != null && !visited.test(l)) {
2102 loggers.add(l);
2103 }
2104 }
2105 if (loggers.isEmpty()) continue;
2106 for (String pk : properties) {
2107 ConfigProperty cp = ConfigProperty.find(pk).getWhenPresent();
2108 String p = previous.getProperty(pk, null);
2109 String n = next.getProperty(pk, null);
2110
2111 // Determines the type of modification.
2112 ModType mod = ModType.of(p, n);
2113
2114 // mod == SAME means that the two values are equals, there
2115 // is nothing to do. Usually, this should not happen as such
2116 // properties should have been filtered above.
2117 // It could happen however if the properties had
2118 // trailing/leading whitespaces.
2119 if (mod == ModType.SAME) continue;
2120
2121 switch (cp) {
2122 case LEVEL:
2123 if (mod == ModType.REMOVED) continue;
2124 Level level = Level.findLevel(trim(n));
2125 if (level != null) {
2126 if (name.isEmpty()) {
2127 rootLogger.setLevel(level);
|