title: Why StreamHandler doesn't catch log messages?
body: <p>What is wrong with this code?</p>
  <pre><code>import java.io.ByteArrayOutputStream;
  import java.nio.charset.StandardCharsets;
  import java.util.logging.SimpleFormatter;
  import java.util.logging.Logger;
  import java.util.logging.StreamHandler;
  
  Logger log = Logger.getLogger(&quot;foo&quot;);
  log.setUseParentHandlers(false);
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  log.addHandler(new StreamHandler(baos, new SimpleFormatter()));
  log.info(&quot;test&quot;);
  assert baos.toByteArray().length &gt; 0;
  </code></pre>
  <p>It fails since <code>baos</code> is empty. Why it's empty?</p>