OpenSearch/libs
William Brafford 2b549e7342
CLI tools: write errors to stderr instead of stdout (#45586)
Most of our CLI tools use the Terminal class, which previously did not provide methods for writing to standard output. When all output goes to standard out, there are two basic problems. First, errors and warnings are "swallowed" in pipelines, making it hard for a user to know when something's gone wrong. Second, errors and warnings are intermingled with legitimate output, making it difficult to pass the results of interactive scripts to other tools.

This commit adds a second set of print commands to Terminal for printing to standard error, with errorPrint corresponding to print and errorPrintln corresponding to println. This leaves it to developers to decide which output should go where. It also adjusts existing commands to send errors and warnings to stderr.

Usage is printed to standard output when it's correctly requested (e.g., bin/elasticsearch-keystore --help) but goes to standard error when a command is invoked incorrectly (e.g. bin/elasticsearch-keystore list-with-a-typo | sort).
2019-08-21 14:46:07 -04:00
..
cli CLI tools: write errors to stderr instead of stdout (#45586) 2019-08-21 14:46:07 -04:00
core Run testExtendedSocketOptions only on JDK11+ (#44055) 2019-08-06 13:15:17 +02:00
dissect Eclipse libs projects setup fix (#42852) 2019-06-04 13:52:41 -07:00
geo Geo: Change order of parameter in Geometries to lon, lat 7.x (#45618) 2019-08-16 14:42:02 -04:00
grok Upgrade jcodings dependency to 1.0.44 (#43334) 2019-06-26 10:03:40 +02:00
nio Fix tests after backport of #44055 2019-08-06 14:19:20 +02:00
plugin-classloader [Backport] Replace usages RandomizedTestingTask with built-in Gradle Test (#40978) (#40993) 2019-04-09 11:52:50 -07:00
secure-sm Eclipse libs projects setup fix (#42852) 2019-06-04 13:52:41 -07:00
ssl-config Unmute test that seems to be fixed (#44432) 2019-07-31 16:33:21 +02:00
x-content Isolate Request in Call-Chain for REST Request Handling (#45130) (#45417) 2019-08-10 10:21:01 +02:00
build.gradle [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00