Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Copy global logging options to client command
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Dec 18, 2012
1 parent 16a4177 commit 48fec76
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions zanata-cli/src/main/java/org/zanata/client/ZanataClient.java
Expand Up @@ -147,6 +147,7 @@ protected void processArgs(String... args)
}
else
{
copyGlobalOptionsTo(options);
new ArgsUtil(abortStrategy, out, err, getCommandName()).process(otherArgs, options);
}
}
Expand All @@ -156,6 +157,18 @@ protected void processArgs(String... args)
}
}

/**
* @param options
*/
private void copyGlobalOptionsTo(BasicOptions options)
{
options.setDebug(getDebug());
options.setErrors(getErrors());
options.setHelp(getHelp());
options.setInteractiveMode(isInteractiveMode());
options.setQuiet(getQuiet());
}

private void printHelp(PrintStream out)
{
out.println("Usage: " + getCommandName() + " [OPTION]... <command> [COMMANDOPTION]...");
Expand Down

0 comments on commit 48fec76

Please sign in to comment.