toJson method

  1. @override
Json toJson()
override

Implementation

@override
Json toJson() {
  final json = super.toJson();
  json['tag'] = tag;
  json['message'] = message;
  json['severity'] = severity.name;
  json['function'] = function;
  json['fileName'] = fileName;
  json['lineNumber'] = lineNumber;

  if (callerRawFrame != null) json['callerRawFrame'] = callerRawFrame;
  if (callStackSymbols != null) {
    json['callStackSymbols'] = callStackSymbols;
  } else if (stackTrace != null) {
    json['stackTrace'] = stackTrace;
  }
  if (exception != null) json['exception'] = exception!.toJson();
  return json;
}