convertToLogOptions static method

LogOptions convertToLogOptions(
  1. String logLevel
)

Implementation

static LogOptions convertToLogOptions(String logLevel) {
  var logOptions = const LogOptions(LogLevel.off);

  switch (logLevel) {
    case 'all':
      logOptions = const LogOptions(LogLevel.all);
      break;

    case 'debug':
      logOptions = const LogOptions(LogLevel.debug);
      break;

    case 'info':
      logOptions = const LogOptions(LogLevel.info);
      break;

    case 'warning':
      logOptions = const LogOptions(LogLevel.warning);
      break;

    case 'error':
      logOptions = const LogOptions(LogLevel.error);
      break;
  }

  return logOptions;
}