Reputation: 11486
We have added the --debug
flag to all our AWS CLI commands so that we get more information on what is happening during deployments on our CI/CD servers.
The problem is that all debug
output is written to stderr
instead of stdout
, which leads to a lot of messages popping up as errormessages, although they are just debug information.
How can I configure the AWS CLI to output debug
messages to stdout
?
EDIT: how can I do this without redirecting stdout
? If I redirect it I will nog be able to access the debug output on my CD/CI server.
Upvotes: 2
Views: 5971
Reputation: 13638
You can redirect stderr to stdout with the 2>&1
construction.
See https://askubuntu.com/questions/625224/how-to-redirect-stderr-to-a-file
Upvotes: 2
Reputation: 14191
You can try to redirect stderr
to stdout
from the shell command
aws commad 2>&1
Upvotes: 1