Examples of SimpleFormatter


Examples of java.util.logging.SimpleFormatter

    public DebugHandler(TestHarness harness)
    {
      this.harness = harness;
      setLevel(Level.ALL);
      setFormatter(new SimpleFormatter());
    }
View Full Code Here

Examples of java.util.logging.SimpleFormatter

          + getTimestamp() + ".%u.%g.log";

      FileHandler handler = new FileHandler(logPattern, LIMIT_PER_FILE,
          MAX_NUM_LOG_FILES, APPEND);

      handler.setFormatter(new SimpleFormatter());
     

      this.logger = Logger.getLogger(LOGGER_NAME);
      this.logger.addHandler(handler);
      this.logger.setUseParentHandlers(SEND_TO_PARENT_LOGGER);
View Full Code Here

Examples of java.util.logging.SimpleFormatter

         IOException,
         SecurityException
   {
      super(FileHandlerLogger.s_getPathAbsFileLogJava());

      super.setFormatter(new SimpleFormatter());
   }
View Full Code Here

Examples of java.util.logging.SimpleFormatter

    }

    private Logger getFallabckLogger() {
        java.util.logging.Logger logger = Logger.getLogger("OpenEJB.logging");
        ConsoleHandler consoleHandler = new ConsoleHandler();
        consoleHandler.setFormatter(new SimpleFormatter());
        logger.addHandler(consoleHandler);
        return logger;
    }
View Full Code Here

Examples of java.util.logging.SimpleFormatter

        if (formatterName != null) {
            try {
                setFormatter((Formatter) cl.loadClass(formatterName).newInstance());
            } catch (Exception e) {
                // Ignore and fallback to defaults
                setFormatter(new SimpleFormatter());
            }
        } else {
            setFormatter(new SimpleFormatter());
        }
       
        // Set error manager
        setErrorManager(new ErrorManager());
       
View Full Code Here

Examples of java.util.logging.SimpleFormatter

    logger.setLevel(Level.ALL);
    try
    {
      fh = new FileHandler( "log.txt" );
      logger.addHandler(fh);
      fh.setFormatter(new SimpleFormatter());
    }  
    catch (SecurityException exception)
    {
      logger.log(Level.WARNING, "Erzeugung des FileHandlers fehlgeschlagen", exception);
    }
View Full Code Here

Examples of java.util.logging.SimpleFormatter

         * Constructs RMIStreamHandler from the given OutputStream.
         *
         * @param out underlying OutputStream for this handler
         */
        RMIStreamHandler(OutputStream out) {
            super(out, new SimpleFormatter());
            ps = new PrintStream(out);
        }
View Full Code Here

Examples of java.util.logging.SimpleFormatter

      Logger.getLogger("org.wikipediacleaner").setLevel(Level.FINE);
    }
    if (config.getBoolean(null, ConfigurationValueBoolean.DEBUG_FILE)) {
      try {
        Handler fh = new FileHandler("%t/WPCleaner.log");
        fh.setFormatter(new SimpleFormatter());
        Logger.getLogger("").addHandler(fh);
      } catch (Exception e) {
        // Nothing to do
      }
    }
View Full Code Here

Examples of java.util.logging.SimpleFormatter

      Logger.getLogger("org.wikipediacleaner").setLevel(Level.FINE);
    }
    if (config.getBoolean(null, ConfigurationValueBoolean.DEBUG_FILE)) {
      try {
        Handler fh = new FileHandler("WPCleanerBot.log");
        fh.setFormatter(new SimpleFormatter());
        Logger.getLogger("").addHandler(fh);
      } catch (Exception e) {
        // Nothing to do
      }
    }
View Full Code Here

Examples of java.util.logging.SimpleFormatter

            record.setParameters(params);
        }
        record.setResourceBundle(logger.getResourceBundle());
        record.setSourceClassName(sourceClassName);
        Formatter formatter = new SimpleFormatter();
       
        return formatter.formatMessage(record);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.