I have a String formatter like this:
String testLogMessage = String.format("testing %s scenario %s", "BIG");
logger.info(String.format(testLogMessage, 1));
I have several tests and want to pass a number into my testLogMessage. At runtime I get this exception:
java.util.MissingFormatArgumentException: Format specifier '%s'
at java.util.Formatter.format(Unknown Source)
at java.util.Formatter.format(Unknown Source)
at java.lang.String.format(Unknown Source)
I could use a second string formatter, but is there another way to do this?