Skip to content

Commit

Permalink
printをlogに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
poppingmoon committed Nov 7, 2023
1 parent 4fea7a9 commit 3b2afbc
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/ping_response.dart';
Expand Down Expand Up @@ -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
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 @@ -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);
Expand Down Expand Up @@ -135,7 +135,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 3b2afbc

Please sign in to comment.