Search in sources :

Example 1 with PluginManager

use of org.apache.logging.log4j.core.config.plugins.util.PluginManager in project x-pipe by ctripcorp.

the class LogTest method testPlugin.

@Test
public void testPlugin() {
    PluginManager pm = new PluginManager(PatternConverter.CATEGORY);
    pm.collectPlugins();
    for (Entry<String, PluginType<?>> entry : pm.getPlugins().entrySet()) {
        logger.info("{} : {}", entry.getKey(), entry.getValue());
    }
    logger.error("[testPlugin]", new IOException("io exception message..."));
}
Also used : PluginManager(org.apache.logging.log4j.core.config.plugins.util.PluginManager) IOException(java.io.IOException) PluginType(org.apache.logging.log4j.core.config.plugins.util.PluginType) Test(org.junit.Test) AbstractMetaServerTest(com.ctrip.xpipe.redis.meta.server.AbstractMetaServerTest)

Aggregations

AbstractMetaServerTest (com.ctrip.xpipe.redis.meta.server.AbstractMetaServerTest)1 IOException (java.io.IOException)1 PluginManager (org.apache.logging.log4j.core.config.plugins.util.PluginManager)1 PluginType (org.apache.logging.log4j.core.config.plugins.util.PluginType)1 Test (org.junit.Test)1