本文整理了Java中org.apache.logging.log4j.core.Logger.getMessageFactory()
方法的一些代码示例,展示了Logger.getMessageFactory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.getMessageFactory()
方法的具体详情如下:
包路径:org.apache.logging.log4j.core.Logger
类名称:Logger
方法名:getMessageFactory
暂无
代码示例来源:origin: org.apache.logging.log4j/log4j-core
private static void checkMessageFactory(final MessageFactory messageFactory1, final Logger testLogger1) {
if (messageFactory1 == null) {
assertEquals(AbstractLogger.DEFAULT_MESSAGE_FACTORY_CLASS, testLogger1.getMessageFactory().getClass());
} else {
MessageFactory actual = testLogger1.getMessageFactory();
if (actual instanceof MessageFactory2Adapter) {
actual = ((MessageFactory2Adapter) actual).getOriginal();
}
assertEquals(messageFactory1, actual);
}
}
代码示例来源:origin: mulesoft/mule
@Override
public MessageFactory getMessageFactory() {
return originalLogger.getMessageFactory();
}
代码示例来源:origin: org.mule.modules/mule-module-launcher
@Override
public MessageFactory getMessageFactory()
{
return originalLogger.getMessageFactory();
}
代码示例来源:origin: org.mule.runtime/mule-module-launcher
@Override
public MessageFactory getMessageFactory() {
return originalLogger.getMessageFactory();
}
代码示例来源:origin: ops4j/org.ops4j.pax.logging
protected Object writeReplace() throws ObjectStreamException {
return new LoggerProxy(getName(), getMessageFactory());
}
代码示例来源:origin: ops4j/org.ops4j.pax.logging
/**
* This method is only used for 1.x compatibility. Returns the parent of this Logger. If it doesn't already exist
* return a temporary Logger.
*
* @return The parent Logger.
*/
public Logger getParent() {
final LoggerConfig lc = privateConfig.loggerConfig.getName().equals(getName()) ? privateConfig.loggerConfig
.getParent() : privateConfig.loggerConfig;
if (lc == null) {
return null;
}
final String lcName = lc.getName();
final MessageFactory messageFactory = getMessageFactory();
if (context.hasLogger(lcName, messageFactory)) {
return context.getLogger(lcName, messageFactory);
}
return new Logger(context, lcName, messageFactory);
}
内容来源于网络,如有侵权,请联系作者删除!