[KEYCLOAK-11193] Change 'disableLogging' to 'enableLogging' and default to false
This commit is contained in:
parent
2b1acb99a2
commit
ff77b549ec
2 changed files with 7 additions and 5 deletions
|
@ -136,10 +136,10 @@ declare namespace Keycloak {
|
|||
pkceMethod?: KeycloakPkceMethod;
|
||||
|
||||
/**
|
||||
* Disables any information from being logged to the console.
|
||||
* Enables logging messages from Keycloak to the console.
|
||||
* @default false
|
||||
*/
|
||||
disableLogging?: boolean
|
||||
enableLogging?: boolean
|
||||
}
|
||||
|
||||
interface KeycloakLoginOptions {
|
||||
|
|
|
@ -163,8 +163,10 @@
|
|||
kc.pkceMethod = initOptions.pkceMethod;
|
||||
}
|
||||
|
||||
if (typeof initOptions.disableLogging === 'boolean') {
|
||||
kc.disableLogging = initOptions.disableLogging;
|
||||
if (typeof initOptions.enableLogging === 'boolean') {
|
||||
kc.enableLogging = initOptions.enableLogging;
|
||||
} else {
|
||||
kc.enableLogging = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1683,7 +1685,7 @@
|
|||
|
||||
function createLogger(fn) {
|
||||
return function() {
|
||||
if (!kc.disableLogging) {
|
||||
if (kc.enableLogging) {
|
||||
fn.apply(console, Array.prototype.slice.call(arguments));
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue