@Test public void singleCustomLevel() { Configuration.set("level@com.test", "info"); Map<String, Level> levels = ConfigurationParser.getCustomLevels(); assertThat(levels).containsOnly(entry("com.test", Level.INFO)); }
public static Map<String, Level> getCustomLevels() { Map<String, Level> levels = new HashMap<String, Level>(); for (Entry<String, String> entry : Configuration.getSiblings("level@").entrySet()) { String packageOrClass = entry.getKey().substring("level@".length()); Level level = parse(entry.getValue(), null); if (level != null) { levels.put(packageOrClass, level); } } return levels; }
ConfigurationParser { public static Map<String, Level> getCustomLevels() { Map<String, Level> levels = new HashMap<String, Level>(); for (Entry<String, String> entry : Configuration.getSiblings("level@").entrySet()) { String packageOrClass = entry.getKey().substring("level@".length()); Level level = parse(entry.getValue(), null); if (level != null) { levels.put(packageOrClass, level); } } return levels; } }
ConfigurationParser { public static Map<String, Level> getCustomLevels() { Map<String, Level> levels = new HashMap<String, Level>(); for (Entry<String, String> entry : Configuration.getSiblings("level@").entrySet()) { String packageOrClass = entry.getKey().substring("level@".length()); Level level = parse(entry.getValue(), null); if (level != null) { levels.put(packageOrClass, level); } } return levels; } private  ConfigurationParser(); }
ConfigurationParser { public static Map<String, Level> getCustomLevels() { Map<String, Level> levels = new HashMap<String, Level>(); for (Entry<String, String> entry : Configuration.getSiblings("level@").entrySet()) { String packageOrClass = entry.getKey().substring("level@".length()); Level level = parse(entry.getValue(), null); if (level != null) { levels.put(packageOrClass, level); } } return levels; } private  ConfigurationParser(); static Level getGlobalLevel(); static Map<String, Level> getCustomLevels(); static List<String> getTags(); static boolean isWritingThreadEnabled(); static boolean isAutoShutdownEnabled(); static Level parse(final String property, final Level defaultValue); }
ConfigurationParser { public static Map<String, Level> getCustomLevels() { Map<String, Level> levels = new HashMap<String, Level>(); for (Entry<String, String> entry : Configuration.getSiblings("level@").entrySet()) { String packageOrClass = entry.getKey().substring("level@".length()); Level level = parse(entry.getValue(), null); if (level != null) { levels.put(packageOrClass, level); } } return levels; } private  ConfigurationParser(); static Level getGlobalLevel(); static Map<String, Level> getCustomLevels(); static List<String> getTags(); static boolean isWritingThreadEnabled(); static boolean isAutoShutdownEnabled(); static Level parse(final String property, final Level defaultValue);  }