main: display errors through stderr
Pablo Neira Ayuso
maintainerPATCH v2 1/1 main: display errors through stderr
Debugging still goes through stdout as Patrick requests.
--- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/main.c +1 -1
@@ -361,7 +361,7 @@ int main(int argc, char * const *argv) rc =NFT_EXIT_FAILURE ; out:scanner_destroy (scanner); -erec_print_list (stdout, &msgs); +erec_print_list (stderr, &msgs);xfree (buf);return rc;
Signature · 1 line
1.7.10.4
Quoted 4 lines · Pablo Neira Ayuso
Debugging still goes through stdout as Patrick requests.
Thinking about it, EREC_INFORMATIONAL should also go to stdout I suppose. But since we don't have any of those yet, we can change it once we get the first message of this type.
Quoted 20 lines
--- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/main.c +1
-1@@ -361,7 +361,7 @@ int main(int argc, char * const *argv) rc =NFT_EXIT_FAILURE ; out:scanner_destroy (scanner); -erec_print_list (stdout, &msgs); +erec_print_list (stderr, &msgs);xfree (buf);return rc;Signature · 1 line
1.7.10.4
Pablo Neira Ayuso
maintainerQuoted 9 lines · Patrick McHardy
Quoted 4 lines · Pablo Neira Ayuso
Debugging still goes through stdout as Patrick requests.
Thinking about it,
EREC_INFORMATIONALshould also go to stdout I suppose. But since we don't have any of those yet, we can change it once we get the first message of this type.
I just remembered that bison is currently using stderr as output for debugging.
We're also telling people to save their rulesets via:
nft list ruleset > file
If debugging still goes to stdout this will cause them problems. Not sure yet we should use stdout for debugging.
Quoted 14 lines · Pablo Neira Ayuso
Quoted 9 lines · Patrick McHardy
Quoted 4 lines · Pablo Neira Ayuso
Debugging still goes through stdout as Patrick requests.
Thinking about it,
EREC_INFORMATIONALshould also go to stdout I suppose. But since we don't have any of those yet, we can change it once we get the first message of this type.I just remembered that bison is currently using stderr as output for debugging.
Quoted 6 lines
We're also telling people to save their rulesets via:
nft list ruleset > file
If debugging still goes to stdout this will cause them problems. Not sure yet we should use stdout for debugging.
I still think it makes sense since you explicitly requested it, its not an error, its very useful to be able to pipe it to less directly and it preserves order between regular output and debugging without doing anything else.
I guess people simply shouldn't save their rulesets when enabling debugging. Its not like we're doing it by default.