Java 类org.apache.logging.log4j.message.LocalizedMessage 实例源码

项目:dynunit    文件:ApacheLogging.java   
@Override
public void vlogTrace(final Throwable throwable,
                      final ResourceBundle resourceBundle,
                      final String key,
                      final Object... args) {
    logger.trace(new LocalizedMessage(resourceBundle, key, args), throwable);
}
项目:dynunit    文件:ApacheLogging.java   
@Override
public void vlogDebug(final Throwable throwable,
                      final ResourceBundle resourceBundle,
                      final String key,
                      final Object... args) {
    logger.debug(new LocalizedMessage(resourceBundle, key, args), throwable);
}
项目:dynunit    文件:ApacheLogging.java   
@Override
public void vlogInfo(final Throwable throwable,
                     final ResourceBundle resourceBundle,
                     final String key,
                     final Object... args) {
    logger.info(new LocalizedMessage(resourceBundle, key, args), throwable);
}
项目:dynunit    文件:ApacheLogging.java   
@Override
public void vlogWarning(final Throwable throwable,
                        final ResourceBundle resourceBundle,
                        final String key,
                        final Object... args) {
    logger.warn(new LocalizedMessage(resourceBundle, key, args), throwable);
}
项目:dynunit    文件:ApacheLogging.java   
@Override
public void vlogError(final Throwable throwable,
                      final ResourceBundle resourceBundle,
                      final String key,
                      final Object... args) {
    logger.error(new LocalizedMessage(resourceBundle, key, args), throwable);
}
项目:logging-log4j2    文件:LoggerSupplierTest.java   
@Test
public void flowTracing_SupplierOfLocalizedMessage() {
    logger.traceEntry(new Supplier<LocalizedMessage>() {
        @Override
        public LocalizedMessage get() {
            return new LocalizedMessage("int foo={}", 1234567890);
        }
    });
    assertEquals(1, results.size());
    assertThat("Incorrect Entry", results.get(0), startsWith("ENTER[ FLOW ] TRACE Enter"));
    assertThat("Missing entry data", results.get(0), containsString("(int foo=1234567890)"));
    assertThat("Bad toString()", results.get(0), not(containsString("LocalizedMessage")));
}
项目:log4j2    文件:Category.java   
public void l7dlog(final Priority priority, final String key, final Throwable t) {
    if (isEnabledFor(priority)) {
        final Message msg = new LocalizedMessage(bundle, key, null);
        forcedLog(FQCN, priority, msg, t);
    }
}
项目:log4j2    文件:Category.java   
public void l7dlog(final Priority priority, final String key, final Object[] params, final Throwable t) {
    if (isEnabledFor(priority)) {
        final Message msg = new LocalizedMessage(bundle, key, params);
        forcedLog(FQCN, priority, msg, t);
    }
}
项目:dynunit    文件:ApacheLogging.java   
@Override
public void vlogTrace(final ResourceBundle resourceBundle, final String key, final Object... args) {
    logger.trace(new LocalizedMessage(resourceBundle, key, args));
}
项目:dynunit    文件:ApacheLogging.java   
@Override
public void vlogDebug(final ResourceBundle resourceBundle, final String key, final Object... args) {
    logger.debug(new LocalizedMessage(resourceBundle, key, args));
}
项目:dynunit    文件:ApacheLogging.java   
@Override
public void vlogInfo(final ResourceBundle resourceBundle, final String key, final Object... args) {
    logger.info(new LocalizedMessage(resourceBundle, key, args));
}
项目:dynunit    文件:ApacheLogging.java   
@Override
public void vlogWarning(final ResourceBundle resourceBundle, final String key, final Object... args) {
    logger.warn(new LocalizedMessage(resourceBundle, key, args));
}
项目:dynunit    文件:ApacheLogging.java   
@Override
public void vlogError(final ResourceBundle resourceBundle, final String key, final Object... args) {
    logger.error(new LocalizedMessage(resourceBundle, key, args));
}
项目:logging-log4j2    文件:Category.java   
public void l7dlog(final Priority priority, final String key, final Throwable t) {
    if (isEnabledFor(priority)) {
        final Message msg = new LocalizedMessage(bundle, key, null);
        forcedLog(FQCN, priority, msg, t);
    }
}
项目:logging-log4j2    文件:Category.java   
public void l7dlog(final Priority priority, final String key, final Object[] params, final Throwable t) {
    if (isEnabledFor(priority)) {
        final Message msg = new LocalizedMessage(bundle, key, params);
        forcedLog(FQCN, priority, msg, t);
    }
}