Package com.google.gwt.dev.util.log

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


  }

  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

  }

  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

    }
  }

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

      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

        "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

    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

  // 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

   * 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

   * 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

Related Classes of com.google.gwt.dev.util.log.PrintWriterTreeLogger

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.