Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setLogLevel(logLevel: RemoteConfigLogLevel): void {
switch (logLevel) {
case 'debug':
this._logger.logLevel = FirebaseLogLevel.DEBUG;
break;
case 'silent':
this._logger.logLevel = FirebaseLogLevel.SILENT;
break;
default:
this._logger.logLevel = FirebaseLogLevel.ERROR;
}
}
export function getLogLevel(): LogLevel {
if (logClient.logLevel === FirebaseLogLevel.DEBUG) {
return LogLevel.DEBUG;
} else if (logClient.logLevel === FirebaseLogLevel.SILENT) {
return LogLevel.SILENT;
} else {
return LogLevel.ERROR;
}
}
export function setLogLevel(newLevel: LogLevel): void {
setLogLevel(logLevel) {
switch (logLevel) {
case 'debug':
this._logger.logLevel = LogLevel.DEBUG;
break;
case 'silent':
this._logger.logLevel = LogLevel.SILENT;
break;
default:
this._logger.logLevel = LogLevel.ERROR;
}
}
get fetchTimeMillis() {
RemoteConfig.prototype.setLogLevel = function (logLevel) {
switch (logLevel) {
case 'debug':
this._logger.logLevel = LogLevel.DEBUG;
break;
case 'silent':
this._logger.logLevel = LogLevel.SILENT;
break;
default:
this._logger.logLevel = LogLevel.ERROR;
}
};
Object.defineProperty(RemoteConfig.prototype, "fetchTimeMillis", {
export function setLogLevel(newLevel: LogLevel): void {
/**
* Map the new log level to the associated Firebase Log Level
*/
switch (newLevel) {
case LogLevel.DEBUG:
logClient.logLevel = FirebaseLogLevel.DEBUG;
break;
case LogLevel.ERROR:
logClient.logLevel = FirebaseLogLevel.ERROR;
break;
case LogLevel.SILENT:
logClient.logLevel = FirebaseLogLevel.SILENT;
break;
default:
logClient.error(
`Firestore (${SDK_VERSION}): Invalid value passed to \`setLogLevel\``
);
}
}