Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * See the file LICENSE for redistribution information.
   * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
JE instances of java.util.logging.Logger are configured to use this implementation of java.util.logging.FileHandler. By default, the handler's level is java.util.logging.Level.INFO To enable the console output, use the standard java.util.logging.LogManager configuration to set the desired level:

The default destination for this output is a circular set of files named <environmentHome>/ The logging file size can be configured with standard java.util.logging.FileHandler configuration.

JE augments the java.util.logging API with a JE environment parameter for setting handler levels. This is described in greater detail in href="{@docRoot/../GettingStartedGuide/managelogging.html"> Chapter 12.Administering Berkeley DB Java Edition Applications}

See also:
Chapter 12. Logging
Using JE Trace Logging
 public class FileHandler extends java.util.logging.FileHandler {
      * The default ErrorManager will blindly write to stderr when it sees an
      * exception.  For instance, when we send an interrupt() to the Rep Node
      * we can see an InterruptedIOException written to stderr, but it never
      * gets passed to the caller.  For several tests, this causes irrelevant
      * stack traces to spew out even though no execption is ever thrown at us.
      * e.g.
      * ------------- Standard Error -----------------
      * java.util.logging.ErrorManager: 2
      *     at Method)
      *     at
      *     at
      *     at
      *     at java.util.logging.FileHandler$MeteredStream.flush(
      *     at sun.nio.cs.StreamEncoder.implFlush(
      *     at sun.nio.cs.StreamEncoder.flush(
      *     at        at java.util.logging.StreamHandler.flush(        at java.util.logging.FileHandler.publish(
      *     at
      *     at java.util.logging.Logger.log(
      *     at java.util.logging.Logger.doLog(
      *     at java.util.logging.Logger.log(
      *     at
      *     at
      *     at
      *     at
     public static boolean STIFLE_DEFAULT_ERROR_MANAGER = false;
      * Using a JE specific handler lets us enable and disable output for the
      * entire library, and specify an environment specific format and level
      * default.
     public FileHandler(String pattern,
                        int limit,
                        int count,
                        Formatter formatter,
                        EnvironmentImpl envImpl)
         throws SecurityExceptionIOException {
         super(patternlimitcounttrue /* append */);
             ErrorManager em = new ErrorManager() {
                     public void error(String msgException eint code) {
                         if () {
                                 ("FileHandler stifled exception: " + e);
                         } else {
         /* Messages may be formatted with an environment specific tag. */
        Level level = LoggerUtils.getHandlerLevel
            (envImpl.getConfigManager(), .,
             getClass().getName() + ".level");
New to GrepCode? Check out our FAQ X