json static method
void
json(
- dynamic message, {
- String? tag,
- DateTime? time,
- Object? error,
- StackTrace? stackTrace,
Log pretty JSON
Implementation
static void json(
dynamic message, {
String? tag,
DateTime? time,
Object? error,
StackTrace? stackTrace,
}) {
final json = _encoder.convert(message);
final messageString = tag != null ? '$tag:\n$json' : json;
_logger.log(
Level.debug,
messageString,
time: time,
error: error,
stackTrace: stackTrace,
);
}