| | |
| | | |
| | | static |
| | | { |
| | | // catch all categories used when nothing else matches. |
| | | // FIXME catch all does not work with current code. |
| | | // Maybe should we use a trie data structure instead of a NavigableMap? |
| | | // NAMES.put("org.opends", "CORE"); |
| | | // NAMES.put("org.forgerock.opendj", "CORE"); |
| | | |
| | | // The category used for messages associated with the core server. |
| | | NAMES.put("org.opends.server.core", "CORE"); |
| | | NAMES.put("org.forgerock.opendj.ldap", "CORE"); |
| | |
| | | { |
| | | assertEquals(LoggingCategoryNames.getCategoryName(classname), classname); |
| | | } |
| | | |
| | | @Test |
| | | public void testSubPackages() throws Exception |
| | | { |
| | | assertEquals(LoggingCategoryNames.getCategoryName("org.opends.server.backends.jeb.foo"), "JEB"); |
| | | assertEquals(LoggingCategoryNames.getCategoryName("org.opends.server.backends.jeb"), "JEB"); |
| | | assertEquals(LoggingCategoryNames.getCategoryName("org.opends.server.backends"), "BACKEND"); |
| | | assertEquals(LoggingCategoryNames.getCategoryName("org.opends.server"), "org.opends.server"); |
| | | } |
| | | } |