本文整理匯總了Java中org.apache.logging.slf4j.Log4jLoggerFactory類的典型用法代碼示例。如果您正苦於以下問題:Java Log4jLoggerFactory類的具體用法?Java Log4jLoggerFactory怎麽用?Java Log4jLoggerFactory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Log4jLoggerFactory類屬於org.apache.logging.slf4j包,在下文中一共展示了Log4jLoggerFactory類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getActiveLoggersInFactory
import org.apache.logging.slf4j.Log4jLoggerFactory; //導入依賴的package包/類
private Map<String, Logger> getActiveLoggersInFactory() {
final Log4jLoggerFactory factory = (Log4jLoggerFactory) getCasLoggerFactoryInstance();
if (factory != null) {
return factory.getLoggersInContext(this.loggerContext);
}
return new HashMap<>();
}
示例2: testSlf4jFactorySet
import org.apache.logging.slf4j.Log4jLoggerFactory; //導入依賴的package包/類
@Test
public void testSlf4jFactorySet() throws Exception {
ILoggerFactory factory = LoggerFactory.getILoggerFactory();
assertThat(factory).isInstanceOf(Log4jLoggerFactory.class);
}
示例3: StaticLoggerBinder
import org.apache.logging.slf4j.Log4jLoggerFactory; //導入依賴的package包/類
/**
* Private constructor to prevent instantiation
*/
private StaticLoggerBinder() {
loggerFactory = new Log4jLoggerFactory();
}