Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Loggers only log the message, i.e. they create the log records (or logging requests). They do not publish the messages to the destinations, which is taken care of by the Handlers. Setting the level of a logger, only causes it to <em>create</em> log records matching that level or higher.</p> <p>You might be using a <a href="http://docs.oracle.com/javase/6/docs/api/java/util/logging/ConsoleHandler.html" rel="noreferrer"><code>ConsoleHandler</code></a> (I couldn't infer where your output is System.err or a file, but I would assume that it is the former), which defaults to publishing log records of the level <code>Level.INFO</code>. You will have to configure this handler, to publish log records of level <code>Level.FINER</code> and higher, for the desired outcome.</p> <p>I would recommend reading the <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/logging/overview.html" rel="noreferrer">Java Logging Overview</a> guide, in order to understand the underlying design. The guide covers the difference between the concept of a Logger and a Handler.</p> <p><strong>Editing the handler level</strong></p> <p><strong><em>1. Using the Configuration file</em></strong></p> <p>The java.util.logging properties file (by default, this is the <code>logging.properties</code> file in <code>JRE_HOME/lib</code>) can be modified to change the default level of the ConsoleHandler:</p> <pre><code>java.util.logging.ConsoleHandler.level = FINER </code></pre> <p><strong><em>2. Creating handlers at runtime</em></strong></p> <p>This is not recommended, for it would result in overriding the global configuration. Using this throughout your code base will result in a possibly unmanageable logger configuration.</p> <pre><code>Handler consoleHandler = new ConsoleHandler(); consoleHandler.setLevel(Level.FINER); Logger.getAnonymousLogger().addHandler(consoleHandler); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload