I would like to format my log message before being printed out on the console Logger.fine
e.g. How do I format “{0} has {1} apples with him”, so the inputs are John and 10
I would prefer a logging framework which provides a solution to this and I don’t want to format these messages separately. JDK6 specific logging classes don’t seem to have these granularity.
Use MessageFormat:
or String.format: