summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2020-12-03 14:08:18 -0800
committerGitHub <noreply@github.com>2020-12-03 14:08:18 -0800
commit2a487fc00594a54e5085fb6915e0575db3cb4013 (patch)
treef182043ff899e14fb60f4fa51c698299bff322f6 /src/tools
parent24af5fa65c3c730d4b36810b4e2b0aa43794d29b (diff)
downloadwabt-2a487fc00594a54e5085fb6915e0575db3cb4013.tar.gz
wabt-2a487fc00594a54e5085fb6915e0575db3cb4013.tar.bz2
wabt-2a487fc00594a54e5085fb6915e0575db3cb4013.zip
Use stderr for all logging and error output (#1579)
I'm not sure why we were using stdout but the convention is normally to write all logging and error message to stderr.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/spectest-interp.cc2
-rw-r--r--src/tools/wasm-interp.cc2
-rw-r--r--src/tools/wasm-objdump.cc2
-rw-r--r--src/tools/wasm-opcodecnt.cc2
-rw-r--r--src/tools/wasm-validate.cc2
-rw-r--r--src/tools/wasm2c.cc2
-rw-r--r--src/tools/wasm2wat.cc2
-rw-r--r--src/tools/wast2json.cc2
-rw-r--r--src/tools/wat2wasm.cc2
9 files changed, 9 insertions, 9 deletions
diff --git a/src/tools/spectest-interp.cc b/src/tools/spectest-interp.cc
index a212053c..8f380ad8 100644
--- a/src/tools/spectest-interp.cc
+++ b/src/tools/spectest-interp.cc
@@ -69,7 +69,7 @@ static void ParseOptions(int argc, char** argv) {
parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
s_verbose++;
- s_log_stream = FileStream::CreateStdout();
+ s_log_stream = FileStream::CreateStderr();
});
s_features.AddOptions(&parser);
parser.AddOption('V', "value-stack-size", "SIZE",
diff --git a/src/tools/wasm-interp.cc b/src/tools/wasm-interp.cc
index f7561d3f..e349a9e3 100644
--- a/src/tools/wasm-interp.cc
+++ b/src/tools/wasm-interp.cc
@@ -82,7 +82,7 @@ static void ParseOptions(int argc, char** argv) {
parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
s_verbose++;
- s_log_stream = FileStream::CreateStdout();
+ s_log_stream = FileStream::CreateStderr();
});
s_features.AddOptions(&parser);
parser.AddOption('V', "value-stack-size", "SIZE",
diff --git a/src/tools/wasm-objdump.cc b/src/tools/wasm-objdump.cc
index f7ef1ddd..ca28eee4 100644
--- a/src/tools/wasm-objdump.cc
+++ b/src/tools/wasm-objdump.cc
@@ -53,7 +53,7 @@ static void ParseOptions(int argc, char** argv) {
[]() { s_objdump_options.disassemble = true; });
parser.AddOption("debug", "Print extra debug information", []() {
s_objdump_options.debug = true;
- s_log_stream = FileStream::CreateStdout();
+ s_log_stream = FileStream::CreateStderr();
s_objdump_options.log_stream = s_log_stream.get();
});
parser.AddOption('x', "details", "Show section details",
diff --git a/src/tools/wasm-opcodecnt.cc b/src/tools/wasm-opcodecnt.cc
index eb49dce4..5d6225f0 100644
--- a/src/tools/wasm-opcodecnt.cc
+++ b/src/tools/wasm-opcodecnt.cc
@@ -57,7 +57,7 @@ static void ParseOptions(int argc, char** argv) {
parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
s_verbose++;
- s_log_stream = FileStream::CreateStdout();
+ s_log_stream = FileStream::CreateStderr();
s_read_binary_options.log_stream = s_log_stream.get();
});
s_features.AddOptions(&parser);
diff --git a/src/tools/wasm-validate.cc b/src/tools/wasm-validate.cc
index 3d671b2f..a55c5ed8 100644
--- a/src/tools/wasm-validate.cc
+++ b/src/tools/wasm-validate.cc
@@ -50,7 +50,7 @@ static void ParseOptions(int argc, char** argv) {
parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
s_verbose++;
- s_log_stream = FileStream::CreateStdout();
+ s_log_stream = FileStream::CreateStderr();
});
s_features.AddOptions(&parser);
parser.AddOption("no-debug-names", "Ignore debug names in the binary file",
diff --git a/src/tools/wasm2c.cc b/src/tools/wasm2c.cc
index d35d5789..896841a2 100644
--- a/src/tools/wasm2c.cc
+++ b/src/tools/wasm2c.cc
@@ -60,7 +60,7 @@ static void ParseOptions(int argc, char** argv) {
parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
s_verbose++;
- s_log_stream = FileStream::CreateStdout();
+ s_log_stream = FileStream::CreateStderr();
});
parser.AddOption(
'o', "output", "FILENAME",
diff --git a/src/tools/wasm2wat.cc b/src/tools/wasm2wat.cc
index 63ce282c..58e89849 100644
--- a/src/tools/wasm2wat.cc
+++ b/src/tools/wasm2wat.cc
@@ -62,7 +62,7 @@ static void ParseOptions(int argc, char** argv) {
parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
s_verbose++;
- s_log_stream = FileStream::CreateStdout();
+ s_log_stream = FileStream::CreateStderr();
});
parser.AddOption(
'o', "output", "FILENAME",
diff --git a/src/tools/wast2json.cc b/src/tools/wast2json.cc
index 9cc2afbd..a5c9a47d 100644
--- a/src/tools/wast2json.cc
+++ b/src/tools/wast2json.cc
@@ -63,7 +63,7 @@ static void ParseOptions(int argc, char* argv[]) {
parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
s_verbose++;
- s_log_stream = FileStream::CreateStdout();
+ s_log_stream = FileStream::CreateStderr();
});
parser.AddOption("debug-parser", "Turn on debugging the parser of wast files",
[]() { s_debug_parsing = true; });
diff --git a/src/tools/wat2wasm.cc b/src/tools/wat2wasm.cc
index e664d589..f77dad27 100644
--- a/src/tools/wat2wasm.cc
+++ b/src/tools/wat2wasm.cc
@@ -69,7 +69,7 @@ static void ParseOptions(int argc, char* argv[]) {
parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
s_verbose++;
- s_log_stream = FileStream::CreateStdout();
+ s_log_stream = FileStream::CreateStderr();
});
parser.AddOption("debug-parser", "Turn on debugging the parser of wat files",
[]() { s_debug_parsing = true; });