mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-01-13 09:22:05 -06:00
suppress default console progress for scripts
This commit is contained in:
parent
8cecd4063b
commit
d422a24c6a
@ -479,10 +479,15 @@ public class NBCLIOptions {
|
||||
|
||||
public String getProgressSpec() {
|
||||
ProgressSpec spec = parseProgressSpec(this.progressSpec);// sanity check
|
||||
if (spec.indicatorMode == IndicatorMode.console
|
||||
&& Level.INFO.isGreaterOrEqual(wantsConsoleLogLevel())) {
|
||||
logger.warn("Console is already logging info or more, so progress data on console is suppressed.");
|
||||
spec.indicatorMode = IndicatorMode.logonly;
|
||||
if (spec.indicatorMode == IndicatorMode.console) {
|
||||
if (Level.INFO.isGreaterOrEqual(wantsConsoleLogLevel())) {
|
||||
logger.warn("Console is already logging info or more, so progress data on console is suppressed.");
|
||||
spec.indicatorMode = IndicatorMode.logonly;
|
||||
} else if (this.getCommands().stream().anyMatch(cmd -> cmd.getCmdType().equals(Cmd.CmdType.script))) {
|
||||
logger.info("Command line includes script calls, so progress data on console is " +
|
||||
"suppressed.");
|
||||
spec.indicatorMode = IndicatorMode.logonly;
|
||||
}
|
||||
}
|
||||
return spec.toString();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user