OpenSearch/x-pack/plugin
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
..
ccr Include leases in ccr errmsg when ops no longer available (#45681) 2019-08-20 10:40:12 -04:00
core Shorten field names in EstimateMemoryUsageResponse (#45719) (#45772) 2019-08-21 12:45:09 +02:00
data-frame [ML][Data Frame] fixing _start?force=true bug (#45660) (#45734) 2019-08-20 09:23:07 -05:00
deprecation Remove Settings from BaseRestRequest Constructor (#45418) (#45429) 2019-08-12 05:14:45 +02:00
frozen-indices Remove Settings from BaseRestRequest Constructor (#45418) (#45429) 2019-08-12 05:14:45 +02:00
graph Remove Settings from BaseRestRequest Constructor (#45418) (#45429) 2019-08-12 05:14:45 +02:00
ilm Stop Executing SLM Policy Transport Action on Snapshot Pool (#45727) (#45748) 2019-08-20 19:15:36 +02:00
logstash Remove description from xpack feature sets (#43065) 2019-06-11 09:22:58 -07:00
mapper-flattened Add support for 'flattened object' fields. (#43762) 2019-07-01 12:08:50 +03:00
ml Shorten field names in EstimateMemoryUsageResponse (#45719) (#45772) 2019-08-21 12:45:09 +02:00
monitoring Remove Settings from BaseRestRequest Constructor (#45418) (#45429) 2019-08-12 05:14:45 +02:00
rollup Mute RollupIndexerStateTests 2019-08-21 10:05:15 +01:00
search-business-rules Search enhancement: pinned queries (#44345) (#45657) 2019-08-20 11:38:22 +01:00
security CLI tools: write errors to stderr instead of stdout (#45586) 2019-08-21 14:46:07 -04:00
spatial Mute ShapeQueryTests#testFieldAlias() 2019-08-21 10:31:13 +01:00
sql SQL: Improve serialization of SQL processors (#45678) 2019-08-20 11:50:47 +03:00
src/test Shorten field names in EstimateMemoryUsageResponse (#45719) (#45772) 2019-08-21 12:45:09 +02:00
vectors Adds usage stats for vectors (#45023) 2019-07-31 12:32:41 -04:00
voting-only-node Close nodes properly in Coordinator tests (#44967) 2019-07-30 11:47:36 +01:00
watcher Fix watcher HttpClient URL creation (#45207) 2019-08-13 12:15:54 +02:00
build.gradle Convert testclusters to use distro download plugin (#44253) (#44362) 2019-07-15 17:53:05 -07:00