ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: How to silence javac task?
Date Fri, 11 Aug 2006 11:41:37 GMT
 
Hi, 

sorry don't know about log filters in ant

a look into source of javac task source shows
4 locations where log(...) is used =

public String getCompiler() {
      
// *** 1. only logged if loglevel warning or higher

                log("Since compiler setting isn't classic or modern,"
                    + "ignoring fork setting.", Project.MSG_WARN);
...

    protected void compile() {
     
// *** 2. always logged as no leglevel specified

            log("Compiling " + compileList.length + " source file"
                + (compileList.length == 1 ? "" : "s")
                + (destDir != null ? " to " + destDir : ""));

...

// *** 3. always logged as no leglevel specified

                  log(filename);

...

// *** 4. logged if failonerror="true" used and an error occurs
                    log(FAIL_MSG, Project.MSG_ERR);



So 2. and 3. are _always_ logged irrespective of used loglevel
it's like using System.out and setloglevel has no impact.

maybe you could change 2. and 3. to log(... , Project.MSG_DEBUG);   
then it should only appear with <setloglevel level="debug" />

Regards, Gilbert

-----Original Message-----
From: Hans Schwaebli [mailto:hans_schwaebli@yahoo.com] 
Sent: Friday, August 11, 2006 1:14 PM
To: Ant Users List
Subject: RE: How to silence javac task?

setloglevel doesn't work. If I use it, the errors are not shown. Javac
treats warnings and errors the same, both are error stream.
   
  Can you tell me if and how I could use a log filter?
   
  Then I would filter the lines from javac which must not be logged.
  


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message