New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test: Allow CliTool to write out stacktraces #7222
Test: Allow CliTool to write out stacktraces #7222
Conversation
@@ -108,6 +113,14 @@ public void printError(String msg, Object... args) { | |||
println(Verbosity.SILENT, "ERROR: " + msg, args); | |||
} | |||
|
|||
public void printError(Throwable t) { | |||
printError("%s", t.getMessage()); | |||
boolean isDebugEnabled = "true".equals(System.getProperty(DEBUG_SYSTEM_PROPERTY, System.getenv(DEBUG_ENV_VAR))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not pull this out to a static var called debugMode
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise, if you want it for testing, it can be done once in the ctor
left a few comments, otherwise LGTM |
@uboness incorporated all of your review comments, were all good and valid. thx! |
LGTM |
In order to have the possibility of debugging on the command line, the user now can either set the es.cli.debug system property which results in stack traces being written to to the terminal. Closes elastic#7222
In order to have the possibility of debugging on the command line, the user now can either set the es.cli.debug system property which results in stack traces being written to to the terminal. Closes #7222
In order to have the possibility of debugging on the command line, the user now can either set the es.cli.debug system property which results in stack traces being written to to the terminal. Closes #7222
In order to have the possibility of debugging on the command line, the user
now can either set the ES_CLI_DEBUG environment variable or at es.cli.debug system
property which results in stack traces being written to stdout.