fetch-json icon indicating copy to clipboard operation
fetch-json copied to clipboard

Add option to enable/disable logging per call

Open dpilafian opened this issue 3 years ago • 0 comments

It would be convenient to turn on or off logging (especially for debugging) with something like:

fetchJson.enableLogger();
fetchJson.get(url).then(handleData);                  //call is logged
fetchJson.get(url, { log: false }).then(handleData);  //call is NOT logged

See the two instances of if (fetchJson.logger) in fetch-json.ts.

dpilafian avatar Jan 10 '21 22:01 dpilafian