setLogLevel static method
You can change the log level to one of the followings:
- LogLevel.debug
LogLeve.info
(by default)- LogLevel.warn
- LogLevel.error
Implementation
static Future<void> setLogLevel(final LogLevel logLevel) async {
String logLevelStr;
switch (logLevel) {
case LogLevel.debug:
logLevelStr = 'Debug';
break;
case LogLevel.info:
logLevelStr = 'Info';
break;
case LogLevel.warn:
logLevelStr = 'Warn';
break;
case LogLevel.error:
logLevelStr = 'Error';
break;
}
await _invokeMethod('setLogLevel', logLevelStr);
}