@Test public void writerWithMinusTag() { Configuration.set("writer", "console"); Configuration.set("writer.tag", "-"); List<String> tags = ConfigurationParser.getTags(); assertThat(tags).isEmpty(); }
public static List<String> getTags() { List<String> tags = new ArrayList<String>(); for (String writerProperty : Configuration.getSiblings("writer").keySet()) { String tag = Configuration.get(writerProperty + ".tag"); if (tag != null && !tag.isEmpty() && !tag.equals("-")) { String[] tagArray = tag.split(","); for (String tagArrayItem : tagArray) { tagArrayItem = tagArrayItem.replaceAll("@.*", "").trim(); if (!tags.contains(tagArrayItem) && !tagArrayItem.isEmpty()) { tags.add(tagArrayItem); } } } } return tags; }
ConfigurationParser { public static List<String> getTags() { List<String> tags = new ArrayList<String>(); for (String writerProperty : Configuration.getSiblings("writer").keySet()) { String tag = Configuration.get(writerProperty + ".tag"); if (tag != null && !tag.isEmpty() && !tag.equals("-")) { String[] tagArray = tag.split(","); for (String tagArrayItem : tagArray) { tagArrayItem = tagArrayItem.replaceAll("@.*", "").trim(); if (!tags.contains(tagArrayItem) && !tagArrayItem.isEmpty()) { tags.add(tagArrayItem); } } } } return tags; } }
ConfigurationParser { public static List<String> getTags() { List<String> tags = new ArrayList<String>(); for (String writerProperty : Configuration.getSiblings("writer").keySet()) { String tag = Configuration.get(writerProperty + ".tag"); if (tag != null && !tag.isEmpty() && !tag.equals("-")) { String[] tagArray = tag.split(","); for (String tagArrayItem : tagArray) { tagArrayItem = tagArrayItem.replaceAll("@.*", "").trim(); if (!tags.contains(tagArrayItem) && !tagArrayItem.isEmpty()) { tags.add(tagArrayItem); } } } } return tags; } private  ConfigurationParser(); }
ConfigurationParser { public static List<String> getTags() { List<String> tags = new ArrayList<String>(); for (String writerProperty : Configuration.getSiblings("writer").keySet()) { String tag = Configuration.get(writerProperty + ".tag"); if (tag != null && !tag.isEmpty() && !tag.equals("-")) { String[] tagArray = tag.split(","); for (String tagArrayItem : tagArray) { tagArrayItem = tagArrayItem.replaceAll("@.*", "").trim(); if (!tags.contains(tagArrayItem) && !tagArrayItem.isEmpty()) { tags.add(tagArrayItem); } } } } return tags; } 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 List<String> getTags() { List<String> tags = new ArrayList<String>(); for (String writerProperty : Configuration.getSiblings("writer").keySet()) { String tag = Configuration.get(writerProperty + ".tag"); if (tag != null && !tag.isEmpty() && !tag.equals("-")) { String[] tagArray = tag.split(","); for (String tagArrayItem : tagArray) { tagArrayItem = tagArrayItem.replaceAll("@.*", "").trim(); if (!tags.contains(tagArrayItem) && !tagArrayItem.isEmpty()) { tags.add(tagArrayItem); } } } } return tags; } 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);  }