This commit is contained in:
mr
2025-02-21 11:14:46 +01:00
parent 28510d0ba1
commit 863a35b878
34 changed files with 153 additions and 128 deletions

View File

@@ -72,6 +72,7 @@ class Log extends SerializerDeserializer<Log> {
String getMessage(String mess) {
var jsonString = mess;
print(mess);
try {
var j = JsonString(mess.replaceAll("\\", "")).decodedValue as Map<String, dynamic>;
map = j;
@@ -87,9 +88,8 @@ class Log extends SerializerDeserializer<Log> {
@override deserialize(dynamic json) {
try { json = json as List<dynamic>;
} catch (e) { return Log(); }
var l = Log(
timestamp: json.isNotEmpty ? DateTime.fromMillisecondsSinceEpoch(int.parse(json[0]) ~/ 1000) : null,
} catch (e) { return Log(); } var l = Log(
timestamp: json.isNotEmpty ? DateTime.fromMillisecondsSinceEpoch(int.parse(json[0]) ~/ 1000, isUtc : true) : null,
message: json.length > 1 ? getMessage(json[1].toString()) : null,
rawMessage : json.length > 1 ? json[1].toString() : null,
);