Package edu.cmu.cs.crystal.internal

Examples of edu.cmu.cs.crystal.internal.ShortExceptionFormatter


     
      //Fix the Crystal loggers so they'll behave as we want.
      Logger crystalLogger = Logger.getLogger(Crystal.class.getName());
      crystalLogger.setLevel(Level.WARNING);
      Handler handler = new ConsoleHandler();
      handler.setFormatter(new ShortExceptionFormatter());
      crystalLogger.addHandler(handler);
      try {
        handler = new FileHandler("%h/crystal.txt");
        handler.setFormatter(new SimpleFormatter());
        crystalLogger.addHandler(handler);
      } catch (SecurityException e) {
        crystalLogger.log(Level.WARNING, "Could not create crystal handler", e.getMessage());
      } catch (IOException e) {
        crystalLogger.log(Level.WARNING, "Could not create crystal handler", e.getMessage());
      }
      crystalLogger.setUseParentHandlers(false);
     
      //Fix the Crystal loggers so they'll behave as we want.
      Logger regLogger = Logger.getLogger(StandardAnalysisReporter.REGRESSION_LOGGER);
      regLogger.setLevel(Level.SEVERE);
      regLogger.addHandler(new ConsoleHandler());
      regLogger.setUseParentHandlers(false);
   

      //The core logger. Should be at warnings only under most circumstances
      core = Logger.getLogger(FusionAnalysis.FUSION_LOGGER);
      core.setLevel(Level.WARNING);
      handler = new ConsoleHandler();
      handler.setFormatter(new ShortExceptionFormatter());
      core.addHandler(handler);
      core.setUseParentHandlers(false);
      try {
        handler = new FileHandler("%h/fusion_core.txt");
        handler.setFormatter(new ShortFormatter());
View Full Code Here

TOP

Related Classes of edu.cmu.cs.crystal.internal.ShortExceptionFormatter

Copyright © 2018 www.massapicom. 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.