@Test public void testInfoPrintingWorksWithMultipleReplacement() { String systemOut = StandardStreamUtilities.wrapSystemOut( () -> print.info("Replace {} of {} {}.", SafeArg.of("all", "all"), SafeArg.of("these", "these"), SafeArg.of("fields", "fields"))); assertThat(systemOut).contains("Replace all of these fields. "); }
@Override public void info(String message, Arg... args) { String infoMessage = MessageFormatter.arrayFormat(message, args).getMessage(); logger.info(message, args); System.out.println(infoMessage); }
OutputPrinter implements OutputStateLogger { @Override public void info(String message, Arg... args) { String infoMessage = MessageFormatter.arrayFormat(message, args).getMessage(); logger.info(message, args); System.out.println(infoMessage); } }
OutputPrinter implements OutputStateLogger { @Override public void info(String message, Arg... args) { String infoMessage = MessageFormatter.arrayFormat(message, args).getMessage(); logger.info(message, args); System.out.println(infoMessage); } OutputPrinter(Logger logger); }
OutputPrinter implements OutputStateLogger { @Override public void info(String message, Arg... args) { String infoMessage = MessageFormatter.arrayFormat(message, args).getMessage(); logger.info(message, args); System.out.println(infoMessage); } 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 info(String message, Arg... args) { String infoMessage = MessageFormatter.arrayFormat(message, args).getMessage(); logger.info(message, args); System.out.println(infoMessage); } 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);  }