MyLogRecord.fromJson constructor

MyLogRecord.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory MyLogRecord.fromJson(Map<String, dynamic> json) {
  return MyLogRecord(
    level: Level(json["levelName"] ?? "", json["levelValue"] ?? -777),
    message: json["message"] ?? "",
    time: DateTime.fromMillisecondsSinceEpoch(json["time"] ?? 0),
    content: MyLogItem.fromJsonStr(json["content"] ?? ""),
    loggerName: json["loggerName"] ?? "",
    sequenceNumber: json["sequenceNumber"] ?? -1,
  );
}