Class JDKLogging


  • public class JDKLogging
    extends Object
    Utility class for java.util.logging support.
    • Constructor Detail

      • JDKLogging

        public JDKLogging()
    • Method Detail

      • disableLogging

        public static void disableLogging()
        Disable java.util.logging.
      • enableVerboseConsoleLoggingForOpenDJ

        public static void enableVerboseConsoleLoggingForOpenDJ()
        Enable JDK logging to stderr at provided level for OpenDJ classes.

        Error and warning messages will be printed on stderr, other messages will be printed on stdout.

      • enableConsoleLoggingForOpenDJTool

        public static void enableConsoleLoggingForOpenDJTool()
        Enable JDK logging for OpenDJ tool.

        Error and warning messages will be printed on stderr, other messages will be printed on stdout. This method should only be used by external tool classes.

      • enableLoggingForOpenDJTool

        public static void enableLoggingForOpenDJTool​(PrintStream stream)
        Enable JDK logging in provided PrintStream for OpenDJ tool.

        All messages will be printed on the provided PrintStream. This method should only be used by external tool classes.

        Parameters:
        stream - The stream to use to print messages.
      • getFormatter

        public static Formatter getFormatter()
        Get a formatter.
        Returns:
        a formatter for loggers
      • getOpendDJLoggingRoots

        public static String[] getOpendDJLoggingRoots()
        Returns the packages to be used as root for logging.

        This package covers all OpenDJ classes.

        Returns:
        the root packages to log