logWithJson method
Implementation
void logWithJson(String message, {dynamic json, String? debugId}) {
debugPrint("\x1B[33m$namespace[${debugId ?? 'ID'}] $message");
if (json != null) {
final str = jsonString(json).splitMapJoin(
'\n',
onMatch: (m) => "${m[0]}\x1B[33m$namespace[${debugId ?? 'ID'}] ",
onNonMatch: (s) => s,
);
debugPrint("\x1B[33m$namespace[${debugId ?? 'ID'}] $str");
}
}