s5cmd icon indicating copy to clipboard operation
s5cmd copied to clipboard

add `--log-stderr`: write log output to stderr

Open bsilverthorn opened this issue 2 years ago • 1 comments

Especially if you're using s5cmd cat, this flag lets you see log output even when redirecting stdout.

bsilverthorn avatar Sep 16 '23 05:09 bsilverthorn

Hello, thanks for the PR. It's a needed feature I believe, but do you think rather than a bool flag, would it be better to make a flag that takes a filepath and write logs to the described file. We can have STDOUT, STDERR as enums, so we can handle those cases too. Something like this seemed feasible:

s5cmd --log-output=STDERR cat "s3://bucket/object"
s5cmd --log-output="debug.log" cat "s3://bucket/object"

Would like your comment on this approach. Obviously, we can direct STDERR and STDOUT to any file with redirection with your approach.

denizsurmeli avatar Sep 16 '23 07:09 denizsurmeli