mirror of https://github.com/apache/cloudstack.git
ScriptRunner: Alternate constructor to get verbosity flag
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
6214b1d4bd
commit
e688fbfc24
|
|
@ -43,6 +43,7 @@ public class ScriptRunner {
|
|||
|
||||
private boolean stopOnError;
|
||||
private boolean autoCommit;
|
||||
private boolean verbosity = true;
|
||||
|
||||
private String delimiter = DEFAULT_DELIMITER;
|
||||
private boolean fullLineDelimiter = false;
|
||||
|
|
@ -58,6 +59,13 @@ public class ScriptRunner {
|
|||
this.stopOnError = stopOnError;
|
||||
}
|
||||
|
||||
public ScriptRunner(Connection connection, boolean autoCommit, boolean stopOnError, boolean verbosity) {
|
||||
this.connection = connection;
|
||||
this.autoCommit = autoCommit;
|
||||
this.stopOnError = stopOnError;
|
||||
this.verbosity = verbosity;
|
||||
}
|
||||
|
||||
public void setDelimiter(String delimiter, boolean fullLineDelimiter) {
|
||||
this.delimiter = delimiter;
|
||||
this.fullLineDelimiter = fullLineDelimiter;
|
||||
|
|
@ -207,7 +215,8 @@ public class ScriptRunner {
|
|||
|
||||
private void println(Object o) {
|
||||
_logBuffer.append(o);
|
||||
s_logger.debug(_logBuffer.toString());
|
||||
if (verbosity)
|
||||
s_logger.debug(_logBuffer.toString());
|
||||
_logBuffer = new StringBuffer();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue