writing something like:logger.debug("this is not "+ foo + " very " + bar +" efficient");is not efficient, as most of the time debug logs are deactivated, and concatenating strings isexpensive. Recall String is immutable, and each "+" create a new String object.
Just a minor comment, the Java compiler (at least OpenJDK and Oracle javac) actually does that for you: it applies constant folding, and it replaces other String concatenations with a StringBuilder.