Open schra opened 3 years ago
Thanks for submitting this. This has been submitted to engineering, and we will let you know when there are any updates on it. Thanks again for such a thorough analysis, troubleshooting, and repro steps.
Digging into this deeper, can you give me an idea of what you are trying to modify? Or did you just stumble upon this bug? Though this is a way to modify the agent config, it is sort of old. It is still useful, but there are easier ways to make changes.
Digging into this deeper, can you give me an idea of what you are trying to modify? Or did you just stumble upon this bug? Though this is a way to modify the agent config, it is sort of old.
I followed the documentation (https://app.scalyr.com/help/scalyr-agent-k8s#export-config) which told me to execute scalyr-agent-2-config --export-config - | tar -xz
and so I executed it and it didn't work due to the warning being printed to stdout.
It is still useful, but there are easier ways to make changes.
Maybe updating this paragraph here https://app.scalyr.com/help/scalyr-agent-k8s#export-config and deprecating --export-config
would be helpful if there are easier ways to make changes.
What
Following the instructions from https://app.scalyr.com/help/scalyr-agent-k8s#export-config fails
Why
Warnings are printed to stdout instead of stderr and thus are also piped to
tar
:Manually removing the warning is a workaround that works:
Docker image version: 2.1.15
Definition of done
The logger should print warnings and errors to
stderr
and notstrdout
. I think this should probably be done here: https://github.com/scalyr/scalyr-agent-2/blob/539b012d662e264c9058bc5bac26b4cb4f62c479/scalyr_agent/scalyr_logging.py#L75-L91