Skip to content

Instantly share code, notes, and snippets.

@anton-gorbikov
Created October 13, 2019 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anton-gorbikov/072651515c34565256c7339f6910c052 to your computer and use it in GitHub Desktop.
Save anton-gorbikov/072651515c34565256c7339f6910c052 to your computer and use it in GitHub Desktop.
MSAL logging
if (!environment.production) {
config = {
...config,
system: {
...config.system,
logger: new Msal.Logger((level, message) => {
switch (level) {
case Msal.LogLevel.Error:
console.error(message);
break;
case Msal.LogLevel.Warning:
console.warn(message);
break;
case Msal.LogLevel.Info:
case Msal.LogLevel.Verbose:
default:
console.log(message);
break;
}
}, { level: Msal.LogLevel.Verbose })
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment