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 (stackTrace != null) json['stackTrace'] = stackTrace;
  if (error != null) json['error'] = error;

  // if (exception != null) json['exception'] = exception;
  // if (exceptionType != null) json['exceptionType'] = exceptionType;
  return json;
}