Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async toggleLogging() {
let logLevel = await AppCenter.getLogLevel();
switch (logLevel) {
case AppCenter.LogLevelAssert:
logLevel = AppCenter.LogLevelNone;
break;
case AppCenter.LogLevelNone:
logLevel = AppCenter.LogLevelVerbose;
break;
default:
logLevel++;
}
await AppCenter.setLogLevel(logLevel);
this.setState({ logLevel });
}
async componentDidMount() {
const component = this;
const appCenterEnabled = await AppCenter.isEnabled();
component.setState({ appCenterEnabled });
const installId = await AppCenter.getInstallId();
component.setState({ installId });
const logLevel = await AppCenter.getLogLevel();
component.setState({ logLevel });
}
async componentDidMount() {
const component = this;
const appCenterEnabled = await AppCenter.isEnabled();
component.setState({ appCenterEnabled });
const installId = await AppCenter.getInstallId();
component.setState({ installId });
const logLevel = await AppCenter.getLogLevel();
component.setState({ logLevel });
}
async componentDidMount() {
const component = this;
const appCenterEnabled = await AppCenter.isEnabled();
component.setState({ appCenterEnabled });
const installId = await AppCenter.getInstallId();
component.setState({ installId });
const logLevel = await AppCenter.getLogLevel();
component.setState({ logLevel });
}
async componentDidMount() {
const component = this;
const appCenterEnabled = await AppCenter.isEnabled();
component.setState({ appCenterEnabled });
const installId = await AppCenter.getInstallId();
component.setState({ installId });
const logLevel = await AppCenter.getLogLevel();
component.setState({ logLevel });
}
async toggleLogging() {
let logLevel = await AppCenter.getLogLevel();
switch (logLevel) {
case AppCenter.LogLevelAssert:
logLevel = AppCenter.LogLevelNone;
break;
case AppCenter.LogLevelNone:
logLevel = AppCenter.LogLevelVerbose;
break;
default:
logLevel++;
}
await AppCenter.setLogLevel(logLevel);
this.setState({ logLevel });
}
async toggleLogging() {
let logLevel = await AppCenter.getLogLevel();
switch (logLevel) {
case AppCenter.LogLevelAssert:
logLevel = AppCenter.LogLevelNone;
break;
case AppCenter.LogLevelNone:
logLevel = AppCenter.LogLevelVerbose;
break;
default:
logLevel++;
}
await AppCenter.setLogLevel(logLevel);
this.setState({ logLevel });
}
async toggleLogging() {
let logLevel = await AppCenter.getLogLevel();
switch (logLevel) {
case AppCenter.LogLevelAssert:
logLevel = AppCenter.LogLevelNone;
break;
case AppCenter.LogLevelNone:
logLevel = AppCenter.LogLevelVerbose;
break;
default:
logLevel++;
}
await AppCenter.setLogLevel(logLevel);
this.setState({ logLevel });
}