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

Log failed Preflight check at INFO level #527

Open
supermitch opened this issue Jul 21, 2020 · 1 comment
Open

Log failed Preflight check at INFO level #527

supermitch opened this issue Jul 21, 2020 · 1 comment

Comments

@supermitch
Copy link

Is your feature request related to a problem? Please describe.

I don't think the preflight check, which throws a 409 when a file exists, should be logging a WARNING in the logs.

Describe the solution you'd like

I think Preflight in particular should log with INFO level. Although I can understand the decision for Preflight to throw a 409, in this case I am calling it specifically to ask "can I overwrite this file?" So the response, whatever it is, shouldn't be a WARNING for my application.

Put another way: If the Preflight just throws a 409 and logs a warning, I don't see how that is different to simply calling folder.upload() and letting it throw the exception. Aren't I just wasting an API call?

Describe alternatives you've considered

I really don't want to set the SDK log level to ERROR and above, but that is the only option I think?

@Jeff-Meadows
Copy link
Contributor

Put another way: If the Preflight just throws a 409 and logs a warning, I don't see how that is different to simply calling folder.upload() and letting it throw the exception. Aren't I just wasting an API call?

The preflight call doesn't send the file content. For large files, this is a major savings in bandwidth and time if the preflight check fails.

I see your point about the log level. It would be nice for log levels to be a bit more customizable, in general.

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

No branches or pull requests

4 participants