ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 28070] New: - ProjectComponent log method logging verbose log calls, when verbose is off
Date Wed, 31 Mar 2004 00:34:47 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28070>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28070

ProjectComponent log method logging verbose log calls, when verbose is off

           Summary: ProjectComponent log method logging verbose log calls,
                    when verbose is off
           Product: Ant
           Version: 1.6.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: matt@clickability.com


In ProjectComponent.java, when project is null and msgLevel >= INFO, logs to to
System.ERR. However, int values for Log levels are 2 for INFO, 3 for VERBOSE,
etc, so it will log info, verbose and debug, and will not log ERROR and WARN
levels. I believe that the developer who wrote this should have set this as <=
so that errors and warns are output but not verbose and debug. 

One specific location that this prints out tons of useless, anoying info is when
using copy, with filtering enabled. FilterSet.java prints out Tons of messages
like: [copy] Replacing: @imageURL@ -> images.foo.com

    public void log(String msg, int msgLevel) {
        if (project != null) {
            project.log(msg, msgLevel);
        } else {
            // 'reasonable' default, if the component is used without
            // a Project ( for example as a standalone Bean ).
            // Most ant components can be used this way.
            if (msgLevel >= Project.MSG_INFO) {
                System.err.println(msg);
            }
        }
    }

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


Mime
View raw message