Skip to content

Commit

Permalink
printをlogに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
poppingmoon committed Oct 30, 2023
1 parent 8ddb059 commit bfec634
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lib/src/misskey_dart_base.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/src/services/socket_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -136,7 +136,7 @@ class SocketController {
body: body,
),
);
print("send[${body.id}]: $request}");
log("send[${body.id}]: $request}");
webSocketChannel.sink.add(request);
}
}
2 changes: 1 addition & 1 deletion lib/src/services/streaming_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class StreamingService {
]);
}
} catch (e) {
print(e);
log(e.toString());
} finally {
subscription = null;
_webSocketChannel = null;
Expand Down

0 comments on commit bfec634

Please sign in to comment.