diff --git a/lib/src/misskey_dart_base.dart b/lib/src/misskey_dart_base.dart index f7553b5a..e1975ee4 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/ping_response.dart'; @@ -556,7 +557,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 264be2f7..c8083e7d 100644 --- a/lib/src/services/socket_controller.dart +++ b/lib/src/services/socket_controller.dart @@ -78,8 +78,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); @@ -135,7 +135,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;