Logger: Do not show null elements

Extremely hacky, I know.
This commit is contained in:
Vishesh Handa
2021-02-15 12:28:35 +01:00
parent cfbd669109
commit dab2b07a88

View File

@ -211,8 +211,16 @@ class LogMessage {
t = map['t']; t = map['t'];
l = map['l']; l = map['l'];
msg = map['msg']; msg = map['msg'];
ex = map['ex']; ex = _checkForNull(map['ex']);
stack = map['stack']; stack = _checkForNull(map['stack']);
props = map['p']; props = _checkForNull(map['p']);
} }
} }
dynamic _checkForNull(dynamic e) {
if (e == null) return e;
if (e.runtimeType == String && e.toString().trim() == 'null') {
return null;
}
return e;
}