diff --git a/lib/src/misskey_dart_base.dart b/lib/src/misskey_dart_base.dart index 4cd6b12e..505c542b 100644 --- a/lib/src/misskey_dart_base.dart +++ b/lib/src/misskey_dart_base.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:developer'; import 'package:misskey_dart/misskey_dart.dart'; import 'package:misskey_dart/src/data/get_avatar_decorations_response.dart'; @@ -558,7 +559,7 @@ class Misskey { streamingService.connect( channel: Channel.main, onChannelEventReceived: (type, response) async { - print(response); + log(response.toString()); switch (type) { case ChannelEventType.notification: await onNotification diff --git a/lib/src/services/socket_controller.dart b/lib/src/services/socket_controller.dart index 526a12c3..a80bea5b 100644 --- a/lib/src/services/socket_controller.dart +++ b/lib/src/services/socket_controller.dart @@ -79,8 +79,8 @@ class SocketController { try { webSocketChannel.sink.add(request); } catch (e) { - print("maybe already disconnected"); - print(e); + log("maybe already disconnected"); + log(e.toString()); rethrow; } finally { onDisconnected?.call(id); @@ -136,7 +136,7 @@ class SocketController { body: body, ), ); - print("send[${body.id}]: $request}"); + log("send[${body.id}]: $request}"); webSocketChannel.sink.add(request); } } diff --git a/lib/src/services/streaming_service.dart b/lib/src/services/streaming_service.dart index aa0d7500..d4da46d2 100644 --- a/lib/src/services/streaming_service.dart +++ b/lib/src/services/streaming_service.dart @@ -181,7 +181,7 @@ class StreamingService { ]); } } catch (e) { - print(e); + log(e.toString()); } finally { subscription = null; _webSocketChannel = null;