AzureAD / azure-activedirectory-library-for-js

The code for ADAL.js and ADAL Angular has been moved to the MSAL.js repo. Please open any issues or PRs at the link below.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/maintenance/adal-angular
Apache License 2.0
627 stars 372 forks source link

Why is there no implementation of console.log here? #734

Closed FDMatthias closed 6 years ago

FDMatthias commented 6 years ago

https://github.com/AzureAD/azure-activedirectory-library-for-js/blob/c306c17e46c108ae680bd90829e8e98fb65416a1/lib/adal.js#L196

Hi, this is more of a question than an issue..

I'm wondering why there's no implementation of console.log there, because now we have to manually map it to console.log like so:

window.Logging.log = function(message) {
  console.log(message);
}

What's the reasoning behind this?

rohitnarula7176 commented 6 years ago

@MatthiasDebaere We do not want to log messages by default as it might increase the write limit in the browser and crash when an app is running for a prolonged period or if it gets stuck in an undefined state.

FDMatthias commented 6 years ago

Thanks for answering, the write limit is a bit far fetched imo since the default logging level is 0 which means only errors and if you're having errors i'm thinking your app is probably broken way before it would be in the situation of exceeding the write limit.. that said, the 'undefined state' reason i can get behind (looking at IE there..). Thanks for the information!