Examples of PrintWriterTreeLogger


Examples of com.google.gwt.dev.util.log.PrintWriterTreeLogger

   *
   * <p>Only one code server should be started at a time because the GWT compiler uses
   * a lot of static variables.</p>
   */
  public static WebServer start(Options options) throws IOException, UnableToCompleteException {
    PrintWriterTreeLogger topLogger = new PrintWriterTreeLogger();
    topLogger.setMaxDetail(options.getLogLevel());

    TreeLogger startupLogger = topLogger.branch(Type.INFO, "Super Dev Mode starting up");
    OutboxTable outboxes = makeOutboxes(options, startupLogger);

    JobEventTable eventTable = new JobEventTable();
    JobRunner runner = new JobRunner(eventTable, outboxes);

View Full Code Here

Examples of com.google.gwt.dev.util.log.PrintWriterTreeLogger

  }

  private TreeLogger makeCompileLogger(CompileDir compileDir, TreeLogger parent)
      throws UnableToCompleteException {
    try {
      PrintWriterTreeLogger fileLogger =
          new PrintWriterTreeLogger(compileDir.getLogFile());
      fileLogger.setMaxDetail(options.getLogLevel());
      return new CompositeTreeLogger(parent, fileLogger);
    } catch (IOException e) {
      parent.log(TreeLogger.ERROR, "unable to open log file: " + compileDir.getLogFile(), e);
      throw new UnableToCompleteException();
    }
View Full Code Here

Examples of com.google.gwt.dev.util.log.PrintWriterTreeLogger

  }

  public Css2Gss(URL resource, boolean lenient) {
    cssFile = resource;
    printWriter = new PrintWriter(System.err);
    this.treeLogger = new PrintWriterTreeLogger(printWriter);
    this.lenient = lenient;
  }
View Full Code Here

Examples of com.google.gwt.dev.util.log.PrintWriterTreeLogger

    }
  }

  private static TreeLogger createTreeLogger() {
    final boolean logToConsole = false;
    return logToConsole ? new PrintWriterTreeLogger() : TreeLogger.NULL;
  }
View Full Code Here

Examples of com.google.gwt.dev.util.log.PrintWriterTreeLogger

      JsOutputOption output) throws IOException, UnableToCompleteException, InterruptedException {
    // Make sure we're using a MemoryUnitCache.
    System.setProperty(UnitCacheSingleton.GWT_PERSISTENTUNITCACHE, "false");
    // Wait 1 second so that any new file modification times are actually different.
    Thread.sleep(1001);
    PrintWriterTreeLogger logger = new PrintWriterTreeLogger();
    logger.setMaxDetail(TreeLogger.ERROR);
    // We might be reusing the same application dir but we want to make sure that the output dir is
    // clean to avoid confusion when returning the output JS.
    File outputDir = new File(applicationDir.getPath() + File.separator + moduleName);
    if (outputDir.exists()) {
      Util.recursiveDelete(outputDir, true);
View Full Code Here

Examples of com.google.gwt.dev.util.log.PrintWriterTreeLogger

        "Line 2: Unexpected element 'inherited'");
  }

  public void testLoadFromLibraryGroup() throws UnableToCompleteException, IOException,
      IncompatibleLibraryVersionException {
    PrintWriterTreeLogger logger = new PrintWriterTreeLogger();
    logger.setMaxDetail(TreeLogger.INFO);

    // Create the library zip file.
    File zipFile = File.createTempFile("FooLib", ".gwtlib");
    zipFile.deleteOnExit();
View Full Code Here

Examples of com.google.gwt.dev.util.log.PrintWriterTreeLogger

    try {
      options.setSoycEnabled(true);
      options.addModuleName("com.google.gwt.sample.hello.Hello");
      options.setWarDir(new File(work, "war"));
      options.setExtraDir(new File(work, "extra"));
      PrintWriterTreeLogger logger = new PrintWriterTreeLogger();
      logger.setMaxDetail(TreeLogger.ERROR);
      new Compiler(options).run(logger);

      // make sure the files have been produced
      assertTrue(new File(options.getExtraDir() + "/hello/soycReport/compile-report/index.html").exists());
      assertTrue(new File(options.getExtraDir() + "/hello/soycReport/compile-report/SoycDashboard-1-index.html").exists());
View Full Code Here

Examples of com.google.gwt.dev.util.log.PrintWriterTreeLogger

  // Set LOG_TO_CONSOLE to true to see a play-by-play.
  private static final boolean LOG_TO_CONSOLE = false;

  public static TreeLogger createTestTreeLogger() {
    if (LOG_TO_CONSOLE) {
      PrintWriterTreeLogger treeLogger = new PrintWriterTreeLogger();
      treeLogger.setMaxDetail(TreeLogger.ALL);
      treeLogger.log(TreeLogger.INFO, "=== logger start ===");
      return treeLogger;
    } else {
      return TreeLogger.NULL;
    }
  }
View Full Code Here

Examples of com.google.gwt.dev.util.log.PrintWriterTreeLogger

   * Tweak this if you want to see the log output.
   */
  private static TreeLogger createTreeLogger() {
    boolean reallyLog = true;
    if (reallyLog) {
      AbstractTreeLogger logger = new PrintWriterTreeLogger();
      logger.setMaxDetail(TreeLogger.WARN);
      return logger;
    }
    return TreeLogger.NULL;
  }
View Full Code Here

Examples of com.google.gwt.dev.util.log.PrintWriterTreeLogger

   * Tweak this if you want to see the log output.
   */
  public static TreeLogger createTreeLogger() {
    boolean reallyLog = false;
    if (reallyLog) {
      AbstractTreeLogger logger = new PrintWriterTreeLogger();
      logger.setMaxDetail(TreeLogger.WARN);
      return logger;
    }
    return TreeLogger.NULL;
  }
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.