@Test public void testWarnPrintingWorksWithSingleReplacement() { String systemOut = StandardStreamUtilities.wrapSystemErr( () -> print.warn("Test this gets {}", UnsafeArg.of("replaced", "replaced"))); assertThat(systemOut).contains("Test this gets replaced "); }
@Override public void warn(String message, Arg... args) { String warnMessage = MessageFormatter.arrayFormat(message, args).getMessage(); logger.warn(message, args); System.err.println(warnMessage); }
OutputPrinter implements OutputStateLogger { @Override public void warn(String message, Arg... args) { String warnMessage = MessageFormatter.arrayFormat(message, args).getMessage(); logger.warn(message, args); System.err.println(warnMessage); } }
OutputPrinter implements OutputStateLogger { @Override public void warn(String message, Arg... args) { String warnMessage = MessageFormatter.arrayFormat(message, args).getMessage(); logger.warn(message, args); System.err.println(warnMessage); } OutputPrinter(Logger logger); }
OutputPrinter implements OutputStateLogger { @Override public void warn(String message, Arg... args) { String warnMessage = MessageFormatter.arrayFormat(message, args).getMessage(); logger.warn(message, args); System.err.println(warnMessage); } OutputPrinter(Logger logger); @Override void info(String message, Arg... args); @Override void warn(String message, Arg... args); @Override void error(final String message, Arg... args); }
OutputPrinter implements OutputStateLogger { @Override public void warn(String message, Arg... args) { String warnMessage = MessageFormatter.arrayFormat(message, args).getMessage(); logger.warn(message, args); System.err.println(warnMessage); } OutputPrinter(Logger logger); @Override void info(String message, Arg... args); @Override void warn(String message, Arg... args); @Override void error(final String message, Arg... args);  }