title: Java logger message template doesn't work
body: <p>I was using a logger, <code>java.util.logging.Logger</code>, in my program. First I wrote something like this:</p>
  
  <pre><code>logger.log(Level.INFO, "message"+str);
  </code></pre>
  
  <p>and the IDE told me I can use a message template to improve efficiency, so the IDE changed the above to:</p>
  
  <pre><code>logger.log(Level.INFO, "message{0}", str);
  </code></pre>
  
  <p>but when I ran the program the output was just:</p>
  
  <pre><code>11:43:05[INFO]message{0}
  </code></pre>
  
  <p>What is wrong with the above code? I have searched about the method and every site tells me that it is the right syntax, but it just doesn't seem to work.</p>
  
  <p><strong>Edit</strong>: I noticed another thread discussing this and the answer was to escape single quote. However, my original code hasn't any single quotes in the string</p>