Skip to content
This repository was archived by the owner on Apr 21, 2018. It is now read-only.

Top level config option to log command-line for eclipse to parse... default off #5

Merged
merged 1 commit into from
Nov 7, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/main/java/com/github/maven_nar/cpptasks/CCTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,12 @@ public void setDecorateLinkerOptions(boolean decorateLinkerOptions) {
* files as possible before throwing a BuildException
*/
private boolean relentless;

/**
* At which log-level do we log command-lines in the build?
*/
private int commandLogLevel = Project.MSG_VERBOSE;

public CCTask() {
}
/**
Expand Down Expand Up @@ -1749,4 +1755,25 @@ public void addConfiguredVersioninfo(VersionInfo newVersionInfo) {
newVersionInfo.setProject(this.getProject());
versionInfos.addElement(newVersionInfo);
}

/**
* Set commandLogLevel
*
* ( CUtil.runCommand() will honor this... )
*
* @parameter commandLogLevel The log-level for command-logs, default is MSG_VERBOSE.
*/
public void setCommandLogLevel( int commandLogLevel ) {
this.commandLogLevel = commandLogLevel;
}

/**
* Get the commandLogLevel
*
* @return The current commandLogLevel
*/
public int getCommandLogLevel() {
return commandLogLevel;
}

}
2 changes: 1 addition & 1 deletion src/main/java/com/github/maven_nar/cpptasks/CUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public static int runCommand(CCTask task, File workingDir,
String[] cmdline, boolean newEnvironment, Environment env)
throws BuildException {
try {
task.log(Commandline.toString(cmdline), Project.MSG_VERBOSE);
task.log(Commandline.toString(cmdline), task.getCommandLogLevel() );
Execute exe = new Execute(new LogStreamHandler(task,
Project.MSG_INFO, Project.MSG_ERR));
if (System.getProperty("os.name").equals("OS/390"))
Expand Down