-
Notifications
You must be signed in to change notification settings - Fork 21
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
consistent URL logging approach #83
Comments
Please vote on hiding urls by default using reactions on this comment. Just on the basic rule of showing urls in logs by default or not (ignore mention of other options above). 👍 for HIDING urls in all logs and errors thrown by default
👎 for SHOWING urls in logs by default
|
I'd like to express a soft preference for the secure-by-default stance of not logging URLs (or at least URL parameters) by default, but given that I'll carry no burden in implementing any of it, feel free to dismiss it. Having sensitive information in the URL is the core of the problem, and it is unlikely that the logging in this library is going to break the camel's back. |
Another approach would be to not log anything by default, and basically follow suit how
If someone wants to see the retries in the logs, they can do so with #77 implemented. Downside is that by default you wouldn't see what's going on, and for Nui as consumer in particular, we'd loose the logging if we update, and would have to either add the custom logging handler everywhere node-fetch-retry is used, or use another new intermediary library... We could also include the logging code, but offer a flag to enable (some standard) logging. Thoughts? |
In the vein of not logging anything by default, it could make sense to introduce some event listeners, so that you can: const fetch = require('...');
fetch.on('fetch', console.log);
fetch.on('error', console.error);
fetch.on('retry', (r) => {
if (r.attempt > 100) {
throw new Error('This is getting ridiculous');
}
}); I'm thinking the custom |
Yes, that's what #77 wants to offer more or less. Interesting to have more event types than just retry.
I wonder how that could work - you'd not want node-fetch-retry to actually retry in this case, so you'd have to add the retry to a queue, tell node-fetch-retry to not retry at all. But then the retry state would be lost and things like the |
From #55
The text was updated successfully, but these errors were encountered: