convent method

McuMgrLogLevel convent()

Implementation

McuMgrLogLevel convent() {
  switch (this) {
    case ProtoLogMessage_LogLevel.DEBUG:
      return McuMgrLogLevel.debug;
    case ProtoLogMessage_LogLevel.VERBOSE:
      return McuMgrLogLevel.verbose;
    case ProtoLogMessage_LogLevel.INFO:
      return McuMgrLogLevel.info;
    case ProtoLogMessage_LogLevel.APPLICATION:
      return McuMgrLogLevel.application;
    case ProtoLogMessage_LogLevel.WARNING:
      return McuMgrLogLevel.warning;
    case ProtoLogMessage_LogLevel.ERROR:
      return McuMgrLogLevel.error;
    default:
      throw 'Unsupported log level';
  }
}