@@ -68,6 +68,9 @@ Other changes: | |||||
attribute if it doesn't exist. | attribute if it doesn't exist. | ||||
Bugzilla Report 66231 | Bugzilla Report 66231 | ||||
* org.apache.tools.ant.BuildLogger now has a new method getMessageOutputLevel() | |||||
which returns the currently set message output level. | |||||
Changes from Ant 1.10.11 TO Ant 1.10.12 | Changes from Ant 1.10.11 TO Ant 1.10.12 | ||||
======================================= | ======================================= | ||||
@@ -46,6 +46,16 @@ public interface BuildLogger extends BuildListener { | |||||
*/ | */ | ||||
void setMessageOutputLevel(int level); | void setMessageOutputLevel(int level); | ||||
/** | |||||
* @return Returns the {@link #setMessageOutputLevel(int) currently set} message output level. | |||||
* The {@code default} implementation of this method returns {@code MSG_INFO}. | |||||
* @since 1.10.13 | |||||
*/ | |||||
default int getMessageOutputLevel() { | |||||
return Project.MSG_INFO; | |||||
} | |||||
/** | /** | ||||
* Sets the output stream to which this logger is to send its output. | * Sets the output stream to which this logger is to send its output. | ||||
* | * | ||||
@@ -93,6 +93,11 @@ public class DefaultLogger implements BuildLogger { | |||||
this.msgOutputLevel = level; | this.msgOutputLevel = level; | ||||
} | } | ||||
@Override | |||||
public int getMessageOutputLevel() { | |||||
return this.msgOutputLevel; | |||||
} | |||||
/** | /** | ||||
* Sets the output stream to which this logger is to send its output. | * Sets the output stream to which this logger is to send its output. | ||||
* | * | ||||
@@ -432,6 +432,11 @@ public class XmlLogger implements BuildLogger { | |||||
msgOutputLevel = level; | msgOutputLevel = level; | ||||
} | } | ||||
@Override | |||||
public int getMessageOutputLevel() { | |||||
return this.msgOutputLevel; | |||||
} | |||||
/** | /** | ||||
* Set the output stream to which logging output is sent when operating | * Set the output stream to which logging output is sent when operating | ||||
* as a logger. | * as a logger. | ||||
@@ -308,6 +308,11 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||||
// Use the logger config | // Use the logger config | ||||
} | } | ||||
@Override | |||||
public int getMessageOutputLevel() { | |||||
return Project.MSG_INFO; | |||||
} | |||||
/** | /** | ||||
* Set the output print stream. | * Set the output print stream. | ||||
* @param output the output stream | * @param output the output stream | ||||
@@ -237,6 +237,11 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||||
} | } | ||||
} | } | ||||
@Override | |||||
public int getMessageOutputLevel() { | |||||
return this.loglevel; | |||||
} | |||||
/** | /** | ||||
* @see BuildLogger#setOutputPrintStream(PrintStream) | * @see BuildLogger#setOutputPrintStream(PrintStream) | ||||
* {@inheritDoc}. | * {@inheritDoc}. | ||||