You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2015/05/08 20:47:35 UTC

[Bug 57909] New: Add getMessageOutputLevel() method to DefaultLogger.java

https://bz.apache.org/bugzilla/show_bug.cgi?id=57909

            Bug ID: 57909
           Summary: Add getMessageOutputLevel() method to
                    DefaultLogger.java
           Product: Ant
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core
          Assignee: notifications@ant.apache.org
          Reporter: djreilly@pacbell.net

I am writing a specialized set of ant tasks.  I have debug code embedded in
these tasks.  I would like an integrated solution for logging data from the
debug code that derives its logging level from the logger.

I have log() statements set up with the level parameter, but it is not as
effecient as checking the level myself before calling log().  I would be able
to avoid processing all the calls to other methods that gather the data to put
into the log record text.

It appears that a simple extension to the DefaultLogger would do the trick.  I
would like a getMessageOutput() that returns current logging level:

    /**
     * Return the current level of message this logger responds to.
     *
     */
    public int getMessageOutputLevel(int level) {
        return this.msgOutputLevel;
    }

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 57909] Add getMessageOutputLevel() method to DefaultLogger.java

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57909

--- Comment #3 from Daniel Reilly <dj...@pacbell.net> ---
When someone specified the -d (debug) parameter, where is that information
stored?  What I need is a simple way to access that information.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 57909] Add getMessageOutputLevel() method to DefaultLogger.java

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57909

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #2 from Stefan Bodewig <bo...@apache.org> ---
I'm not sure how this would help.  In theory there may be multiple
BuildListeners attached - each of them using a different log level.  Also, some
of our built in BuildListeners and most probably all IDE integrations don't
extend DefaultLogger at all.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 57909] Add getMessageOutputLevel() method to DefaultLogger.java

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57909

--- Comment #4 from Stefan Bodewig <bo...@apache.org> ---
(In reply to Daniel Reilly from comment #3)
> When someone specified the -d (debug) parameter, where is that information
> stored?  What I need is a simple way to access that information.

In Main's msgOutputLevel and passed to any BuildLogger's setMessageOutputLevel.

The former is specific to Ant run via the command line, IDE integrations most
likely plug in an AntMain implementation of their own.  BuildLogger is an
interface, where information is stored is up to the implementation.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 57909] Add getMessageOutputLevel() method to DefaultLogger.java

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57909

--- Comment #5 from Daniel Reilly <dj...@pacbell.net> ---
So, can we add a getMsgOutputLevel() to Main?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 57909] Add getMessageOutputLevel() method to DefaultLogger.java

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57909

--- Comment #1 from Stefan Bodewig <bo...@apache.org> ---
*** Bug 57908 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.