Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --log-stderr: write log output to stderr #663

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bsilverthorn
Copy link

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

Especially if you're using `s5cmd cat`, this flag lets you see log
output even when redirecting stdout.
@bsilverthorn bsilverthorn requested a review from a team as a code owner September 16, 2023 05:06
@bsilverthorn bsilverthorn requested review from ilkinulas and denizsurmeli and removed request for a team September 16, 2023 05:06
@denizsurmeli
Copy link
Contributor

denizsurmeli commented Sep 16, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants