dco_decode_log_entry method

  1. @protected
LogEntry dco_decode_log_entry(
  1. dynamic raw
)

Implementation

@protected
LogEntry dco_decode_log_entry(dynamic raw) {
  // Codec=Dco (DartCObject based), see doc to use other codecs
  final arr = raw as List<dynamic>;
  if (arr.length != 5)
    throw Exception('unexpected arr length: expect 5 but see ${arr.length}');
  return LogEntry(
    timeMillis: dco_decode_i_64(arr[0]),
    level: dco_decode_log_level(arr[1]),
    tag: dco_decode_String(arr[2]),
    msg: dco_decode_String(arr[3]),
    stack: dco_decode_opt_String(arr[4]),
  );
}