But you wouldn't do this in Java (need a random string for an integer).
Instead you might see:
logger.fatal( String.format("Program crashed on index %d: %s", i, message) );
I think C has a similar construct, not quite as verbose, that would save 7 characters out of the line...