From 2d89d43a59a166728203b9f9992cba7449c52811 Mon Sep 17 00:00:00 2001 From: Boehrsi Date: Fri, 5 Jun 2020 08:50:57 +0200 Subject: [PATCH] Better logging --- lib/src/log/log_bloc_delegate.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/log/log_bloc_delegate.dart b/lib/src/log/log_bloc_delegate.dart index f9396f02..50eabed9 100644 --- a/lib/src/log/log_bloc_delegate.dart +++ b/lib/src/log/log_bloc_delegate.dart @@ -48,12 +48,12 @@ class LogBlocDelegate implements BlocDelegate { @override void onEvent(Bloc bloc, Object event) { - _logger.info(event.toString()); + _logger.info('Event { bloc: ${bloc.runtimeType}, event: ${event.toString()} }'); } @override void onError(Bloc bloc, Object error, StackTrace stacktrace) { - _logger.warning("Error: $error (Stacktrace: $stacktrace, Bloc Runtime-Type: ${bloc.runtimeType})"); + _logger.warning('Error { bloc: ${bloc.runtimeType}, error: $error, stacktrace: $stacktrace }'); } @override