Package daikon

Class LogHelper


  • public final class LogHelper
    extends Object
    Standard methods for setting up logging. Allows creation of Console writers using one method. Logger methods should only be called in a shell class at setup, after which Logger calls should be used for logging.
    • Method Detail

      • setupLogs

        public static void setupLogs​(Level l,
                                     Formatter formatter)
        Sets up global logs with a given priority and logging output pattern. Creates one ConsoleHandler at root to receive default messages, setting priority to INFO. Removes previous appenders at root.
      • setupLogs

        public static void setupLogs()
        Default method for setting up global logs.
      • setupLogs

        public static void setupLogs​(Level l)
        Sets up global logs with a given priority. Creates one ConsoleHandler. Removes previous appenders at root.
      • setLevel

        public static void setLevel​(Logger lg,
                                    Level l)
        Changes the logging priority of a sub category. Also caches the logger to avoid garbage-collection and recreation with the old level.
      • setLevel

        public static void setLevel​(String s,
                                    Level l)
        Changes the logging priority of a sub category. Also caches the logger to avoid garbage-collection and recreation with the old level.