diff options
author | Sven Gothel <[email protected]> | 2015-03-06 07:34:58 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-03-06 07:34:58 +0100 |
commit | 54dcf4271abf188585b248473cab11b0b4d93854 (patch) | |
tree | 6ad311c0b5e8b302b431d8798b5b653c29983935 /src/java/com/jogamp/gluegen/ant | |
parent | 8eb9e27bccca4a0cd6a0b1b15bee76576ce030c3 (diff) |
Bug 1134 - Refine Logging using 'LoggerIf' - Replace System.err w/ Logging where appropriate
Diffstat (limited to 'src/java/com/jogamp/gluegen/ant')
-rw-r--r-- | src/java/com/jogamp/gluegen/ant/GlueGenTask.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/java/com/jogamp/gluegen/ant/GlueGenTask.java b/src/java/com/jogamp/gluegen/ant/GlueGenTask.java index dd57365..2b11d3f 100644 --- a/src/java/com/jogamp/gluegen/ant/GlueGenTask.java +++ b/src/java/com/jogamp/gluegen/ant/GlueGenTask.java @@ -73,7 +73,8 @@ import org.apache.tools.ant.util.JavaEnvUtils; emitter="[emitter class name]" config="[configuration file]" dumpCPP="[optional boolean]" - debug="[optional boolean]" /> + debug="[optional boolean]" + logLevel="[optional string]" /> * </pre> * * @author Rob Grzywinski <a href="mailto:[email protected]">[email protected]</a> @@ -101,6 +102,11 @@ public class GlueGenTask extends Task private boolean debug=false; /** + * <p>The optional logLevel.</p> + */ + private String logLevel = null; + + /** * <p>The optional dumpCPP flag.</p> */ private boolean dumpCPP=false; @@ -182,6 +188,15 @@ public class GlueGenTask extends Task } /** + * <p>Set the logLevel (optional). This is called by ANT.</p> + */ + public void setLogLevel(final String logLevel) + { + log( ("Setting logLevel: " + logLevel), Project.MSG_VERBOSE); + this.logLevel=logLevel; + } + + /** * <p>Set the dumpCPP flag (optional). This is called by ANT.</p> */ public void setDumpCPP(final boolean dumpCPP) @@ -456,6 +471,12 @@ public void setIncludeRefid(final Reference reference) { gluegenCommandline.createArgument().setValue("--debug"); } + // add the logLevel if enabled + if(null != logLevel) { + gluegenCommandline.createArgument().setValue("--logLevel"); + gluegenCommandline.createArgument().setValue(logLevel); + } + // add the debug flag if enabled if(dumpCPP) { gluegenCommandline.createArgument().setValue("--dumpCPP"); |