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

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

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

Logger.log介绍

暂无

代码示例

代码示例来源:origin: org.apache.logging.log4j/log4j-core

@Test
  public void testLog() {
    final Logger logger = context.getLogger();
    final List<LogEvent> events = listAppender.getEvents();
    assertThat(events, hasSize(0));
    logger.debug("Hello, {}", "World");
    assertThat(events, hasSize(1));
    logger.log(warnLevel, "Hello DIAG");
    assertThat(events, hasSize(2));
    assertEquals(events.get(1).getLevel(), warnLevel);

  }
}

代码示例来源:origin: org.apache.logging.log4j/log4j-core

@Test
  public void testLog() {
    final Logger logger = context.getLogger();
    final List<LogEvent> events = listAppender.getEvents();
    assertThat(events, hasSize(0));
    logger.debug("Hello, {}", "World");
    assertThat(events, hasSize(1));
    logger.log(diagLevel, "Hello DIAG");
    assertThat(events, hasSize(2));
    assertEquals(events.get(1).getLevel(), diagLevel);

  }
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, Marker marker, Object message, Throwable t) {
 getLogger().log(level, marker, message, t);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, Marker marker, String message, Throwable t) {
 getLogger().log(level, marker, message, t);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, Message msg, Throwable t) {
 getLogger().log(level, msg, t);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, String message) {
 getLogger().log(level, message);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, Marker marker, String message, Object... params) {
 getLogger().log(level, marker, message, params);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, String message, Throwable t) {
 getLogger().log(level, message, t);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, Message msg) {
 getLogger().log(level, msg);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, Marker marker, Object message) {
 getLogger().log(level, marker, message);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, Object message, Throwable t) {
 getLogger().log(level, message, t);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, Marker marker, Message msg) {
 getLogger().log(level, marker, msg);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, Marker marker, Message msg, Throwable t) {
 getLogger().log(level, marker, msg, t);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, Marker marker, String message) {
 getLogger().log(level, marker, message);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, Object message) {
 getLogger().log(level, message);
}

代码示例来源:origin: mulesoft/mule

@Override
public void log(Level level, String message, Object... params) {
 getLogger().log(level, message, params);
}

代码示例来源:origin: org.mule.modules/mule-module-launcher

@Override
public void log(Level level, Marker marker, String message)
{
  getLogger().log(level, marker, message);
}

代码示例来源:origin: org.mule.modules/mule-module-launcher

@Override
public void log(Level level, Marker marker, Message msg, Throwable t)
{
  getLogger().log(level, marker, msg, t);
}

代码示例来源:origin: org.mule.modules/mule-module-launcher

@Override
public void log(Level level, Marker marker, Object message, Throwable t)
{
  getLogger().log(level, marker, message, t);
}

代码示例来源:origin: org.mule.modules/mule-module-launcher

@Override
public void log(Level level, Marker marker, String message, Object... params)
{
  getLogger().log(level, marker, message, params);
}

相关文章