org.apache.logging.log4j.core.Logger.getMessageFactory()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(146)

本文整理了Java中org.apache.logging.log4j.core.Logger.getMessageFactory()方法的一些代码示例,展示了Logger.getMessageFactory()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.getMessageFactory()方法的具体详情如下:
包路径:org.apache.logging.log4j.core.Logger
类名称:Logger
方法名:getMessageFactory

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);
}

相关文章