src/share/classes/java/util/logging/ConsoleHandler.java

Print this page




  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 
  27 package java.util.logging;
  28 
  29 import java.io.*;
  30 import java.net.*;
  31 
  32 /**
  33  * This <tt>Handler</tt> publishes log records to <tt>System.err</tt>.
  34  * By default the <tt>SimpleFormatter</tt> is used to generate brief summaries.
  35  * <p>
  36  * <b>Configuration:</b>
  37  * By default each <tt>ConsoleHandler</tt> is initialized using the following
  38  * <tt>LogManager</tt> configuration properties where <tt><handler-name></tt>
  39  * refers to the fully-qualified class name of the handler.
  40  * If properties are not defined
  41  * (or have invalid values) then the specified default values are used.
  42  * <ul>
  43  * <li>   &lt;handler-name&gt;.level
  44  *        specifies the default level for the <tt>Handler</tt>
  45  *        (defaults to <tt>Level.INFO</tt>). </li>
  46  * <li>   &lt;handler-name&gt;.filter
  47  *        specifies the name of a <tt>Filter</tt> class to use
  48  *        (defaults to no <tt>Filter</tt>). </li>
  49  * <li>   &lt;handler-name&gt;.formatter
  50  *        specifies the name of a <tt>Formatter</tt> class to use
  51  *        (defaults to <tt>java.util.logging.SimpleFormatter</tt>). </li>
  52  * <li>   &lt;handler-name&gt;.encoding
  53  *        the name of the character set encoding to use (defaults to
  54  *        the default platform encoding). </li>
  55  * </ul>
  56  * <p>
  57  * For example, the properties for {@code ConsoleHandler} would be:
  58  * <ul>




  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 
  27 package java.util.logging;
  28 
  29 import java.io.*;
  30 import java.net.*;
  31 
  32 /**
  33  * This <tt>Handler</tt> publishes log records to <tt>System.err</tt>.
  34  * By default the <tt>SimpleFormatter</tt> is used to generate brief summaries.
  35  * <p>
  36  * <b>Configuration:</b>
  37  * By default each <tt>ConsoleHandler</tt> is initialized using the following
  38  * <tt>LogManager</tt> configuration properties where {@code <handler-name>}
  39  * refers to the fully-qualified class name of the handler.
  40  * If properties are not defined
  41  * (or have invalid values) then the specified default values are used.
  42  * <ul>
  43  * <li>   &lt;handler-name&gt;.level
  44  *        specifies the default level for the <tt>Handler</tt>
  45  *        (defaults to <tt>Level.INFO</tt>). </li>
  46  * <li>   &lt;handler-name&gt;.filter
  47  *        specifies the name of a <tt>Filter</tt> class to use
  48  *        (defaults to no <tt>Filter</tt>). </li>
  49  * <li>   &lt;handler-name&gt;.formatter
  50  *        specifies the name of a <tt>Formatter</tt> class to use
  51  *        (defaults to <tt>java.util.logging.SimpleFormatter</tt>). </li>
  52  * <li>   &lt;handler-name&gt;.encoding
  53  *        the name of the character set encoding to use (defaults to
  54  *        the default platform encoding). </li>
  55  * </ul>
  56  * <p>
  57  * For example, the properties for {@code ConsoleHandler} would be:
  58  * <ul>