toDartLogLevel method

int toDartLogLevel()

For use with Dart's log function. These levels are inspired by https://pub-web.flutter-io.cn/documentation/logging/latest/logging/Level-class.html

Implementation

int toDartLogLevel() {
  switch (this) {
    // Level.SHOUT
    case SentryLevel.fatal:
      return 1200;
    // Level.SEVERE
    case SentryLevel.error:
      return 1000;
    // Level.SEVERE
    case SentryLevel.warning:
      return 900;
    // Level.INFO
    case SentryLevel.info:
      return 800;
    // Level.CONFIG
    case SentryLevel.debug:
      return 700;
  }
  return 700;
}