Closed sp-aaflalo closed 3 months ago
@sp-aaflalo ACK on this one -- let me sync with the author of this tool on when this can be improved.
Will put it in the next release as well, but will the changes will involve using logging as opposed to stdout for warnings/errors .. the nonzero error code is partially a byproduct of the current alerting approach in this tool, so that should get fixed as well. Generally, if an error occurs, we should be returning a 1 for error state (known or unknown errors), or a 0 for success.
Thanks for implementing proper error code (and yes, 1
not -1
, thanks for the correction).
About logging, only command I can find relating to it is cs_tools logs report
but that doesn't provide any error in the log, only the log of the request etc ...
Is there another settings to get a log file with errors ?
This is something that will need to be changed in the tool's code itself. Right now, a lot of the output it going to terminal stdout (eg. printing it) instead of logged stdout. The update should bring this tool back in line with logging relevant info, rather than printing it.
cs_tools logs report --latest K <path>
simply copies K
number of files from /home/ {anonymous} /.config/cs_tools/.logs
to the path that you specify in <path>
.
First Stop
Platform Configuration
Description
Couple of annoyance with the CLI tool:
-1
on any encountered error.It makes the tool hard to use in the context of a CI/CD.
Need to upload log files securely?
No response