@Test public void testInfoPrintingWorksWithSingleReplacement() { String systemOut = StandardStreamUtilities.wrapSystemOut( () -> print.info("Test this gets {}", SafeArg.of("replaced", "replaced"))); assertThat(systemOut).contains("Test this gets replaced "); }
@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);  }