Skip to content

Commit 248443a

Browse files
Mohit TejaniMohit Tejani
authored andcommitted
refactor: log level changed to silly for API call information which is less informative to trubleshooting
1 parent 869294c commit 248443a

File tree

13 files changed

+37
-37
lines changed

13 files changed

+37
-37
lines changed

pubnub/lib/src/core/supervisor/signals.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ class Signals {
1414
/// @nodoc
1515
void notify(SupervisorEvent event) {
1616
if (_isNetworkAvailable == true && event is NetworkIsDownEvent) {
17-
_logger.verbose('Signaled that network is down.');
17+
_logger.fine('Signaled that network is down.');
1818
_isNetworkAvailable = false;
1919

2020
_controller.add(event);
2121
}
2222

2323
if (_isNetworkAvailable == false && event is NetworkIsUpEvent) {
24-
_logger.verbose('Signaled that network is up.');
24+
_logger.fine('Signaled that network is up.');
2525
_isNetworkAvailable = true;
2626

2727
_controller.add(event);

pubnub/lib/src/dx/batch/batch.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class BatchDx {
3333
bool includeMessageType = true,
3434
bool includeCustomMessageType = false,
3535
bool includeUUID = true}) async {
36-
_logger.info('Fetch messages API call');
36+
_logger.silly('Fetch messages API call');
3737
keyset ??= _core.keysets[using];
3838

3939
var SINGLE_CHANNEL_MAX = 100;
@@ -87,7 +87,7 @@ class BatchDx {
8787
/// Additionally, if a value in the map is null, it will use a timetoken from a named parameter [timetoken].
8888
Future<CountMessagesResult> countMessages(dynamic channels,
8989
{Keyset? keyset, String? using, Timetoken? timetoken}) {
90-
_logger.info('Count messages API call');
90+
_logger.silly('Count messages API call');
9191
keyset ??= _core.keysets[using];
9292

9393
var params = CountMessagesParams(keyset);

pubnub/lib/src/dx/channel/channel_group.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ChannelGroupDx {
1717
/// Lists all channels in a channel [group].
1818
Future<ChannelGroupListChannelsResult> listChannels(String group,
1919
{Keyset? keyset, String? using}) {
20-
_logger.info('List channels API call');
20+
_logger.silly('List channels API call');
2121
keyset ??= _core.keysets[using];
2222

2323
var params = ChannelGroupListChannelsParams(keyset, group);
@@ -40,7 +40,7 @@ class ChannelGroupDx {
4040
Future<ChannelGroupChangeChannelsResult> addChannels(
4141
String group, Set<String> channels,
4242
{Keyset? keyset, String? using}) {
43-
_logger.info('Add channels API call');
43+
_logger.silly('Add channels API call');
4444
keyset ??= _core.keysets[using];
4545

4646
var params = ChannelGroupChangeChannelsParams(keyset, group, add: channels);
@@ -63,7 +63,7 @@ class ChannelGroupDx {
6363
Future<ChannelGroupChangeChannelsResult> removeChannels(
6464
String group, Set<String> channels,
6565
{Keyset? keyset, String? using}) {
66-
_logger.info('Remove channels API call');
66+
_logger.silly('Remove channels API call');
6767
keyset ??= _core.keysets[using];
6868

6969
var params =
@@ -86,7 +86,7 @@ class ChannelGroupDx {
8686
/// Removes ALL channels from a channel [group].
8787
Future<ChannelGroupDeleteResult> delete(String group,
8888
{Keyset? keyset, String? using}) {
89-
_logger.info('Delete channel group API call');
89+
_logger.silly('Delete channel group API call');
9090
keyset ??= _core.keysets[using];
9191

9292
var params = ChannelGroupDeleteParams(keyset, group);

pubnub/lib/src/dx/files/files.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class FileDx {
6666
dynamic fileMessageMeta,
6767
Keyset? keyset,
6868
String? using}) async {
69-
_logger.info('Send file API call');
69+
_logger.silly('Send file API call');
7070
// Validate input parameters to prevent path traversal attacks
7171
FileValidation.validateChannelName(channel);
7272
FileValidation.validateFileName(fileName);
@@ -185,7 +185,7 @@ class FileDx {
185185
String? customMessageType,
186186
Keyset? keyset,
187187
String? using}) async {
188-
_logger.info('Publish file message API call');
188+
_logger.silly('Publish file message API call');
189189
// Validate input parameters to prevent path traversal attacks
190190
FileValidation.validateChannelName(channel);
191191

@@ -234,7 +234,7 @@ class FileDx {
234234
Future<DownloadFileResult> downloadFile(
235235
String channel, String fileId, String fileName,
236236
{CipherKey? cipherKey, Keyset? keyset, String? using}) async {
237-
_logger.info('Download file API call');
237+
_logger.silly('Download file API call');
238238
// Validate input parameters to prevent path traversal attacks
239239
FileValidation.validateChannelName(channel);
240240
FileValidation.validateFileId(fileId);
@@ -281,7 +281,7 @@ class FileDx {
281281
/// If that fails as well, then it will throw [InvariantException].
282282
Future<ListFilesResult> listFiles(String channel,
283283
{int? limit, String? next, Keyset? keyset, String? using}) async {
284-
_logger.info('List files API call');
284+
_logger.silly('List files API call');
285285
// Validate input parameters to prevent path traversal attacks
286286
FileValidation.validateChannelName(channel);
287287

@@ -309,7 +309,7 @@ class FileDx {
309309
Future<DeleteFileResult> deleteFile(
310310
String channel, String fileId, String fileName,
311311
{Keyset? keyset, String? using}) async {
312-
_logger.info('Delete file API call');
312+
_logger.silly('Delete file API call');
313313
// Validate input parameters to prevent path traversal attacks
314314
FileValidation.validateChannelName(channel);
315315
FileValidation.validateFileId(fileId);

pubnub/lib/src/dx/message_action/message_action.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ mixin MessageActionDx on Core {
3232
int? limit = 100,
3333
Keyset? keyset,
3434
String? using}) async {
35-
_logger.info('Fetch message actions API call');
35+
_logger.silly('Fetch message actions API call');
3636
keyset ??= keysets[using];
3737

3838
Ensure(channel).isNotEmpty('channel');
@@ -71,7 +71,7 @@ mixin MessageActionDx on Core {
7171
required Timetoken timetoken,
7272
Keyset? keyset,
7373
String? using}) async {
74-
_logger.info('Add message action API call');
74+
_logger.silly('Add message action API call');
7575
keyset ??= keysets[using];
7676

7777
Ensure(type).isNotEmpty('message action type');
@@ -110,7 +110,7 @@ mixin MessageActionDx on Core {
110110
required Timetoken actionTimetoken,
111111
Keyset? keyset,
112112
String? using}) async {
113-
_logger.info('Delete message action API call');
113+
_logger.silly('Delete message action API call');
114114
keyset ??= keysets[using];
115115

116116
Ensure(channel).isNotEmpty('channel');

pubnub/lib/src/dx/objects/objects.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class ObjectsDx {
6464
Set<String>? sort,
6565
Keyset? keyset,
6666
String? using}) async {
67-
_logger.info('Get all UUID metadata API call');
67+
_logger.silly('Get all UUID metadata API call');
6868
keyset ??= _core.keysets[using];
6969

7070
var include = <String>{};
@@ -123,7 +123,7 @@ class ObjectsDx {
123123
bool includeStatus = true,
124124
bool includeType = true,
125125
}) async {
126-
_logger.info('Get UUID metadata API call');
126+
_logger.silly('Get UUID metadata API call');
127127
keyset ??= _core.keysets[using];
128128

129129
var include = <String>{};
@@ -187,7 +187,7 @@ class ObjectsDx {
187187
String? ifMatchesEtag,
188188
Keyset? keyset,
189189
String? using}) async {
190-
_logger.info('Set UUID metadata API call');
190+
_logger.silly('Set UUID metadata API call');
191191
keyset ??= _core.keysets[using];
192192
Ensure(uuidMetadataInput).isNotNull('uuid metadata input');
193193

@@ -225,7 +225,7 @@ class ObjectsDx {
225225
/// and `uuid` not provided in argument then it throws InvariantException
226226
Future<RemoveUuidMetadataResult> removeUUIDMetadata(
227227
{String? uuid, Keyset? keyset, String? using}) async {
228-
_logger.info('Remove UUID metadata API call');
228+
_logger.silly('Remove UUID metadata API call');
229229
keyset ??= _core.keysets[using];
230230

231231
var params = RemoveUuidMetadataParams(keyset, uuid: uuid);
@@ -283,7 +283,7 @@ class ObjectsDx {
283283
Set<String>? sort,
284284
Keyset? keyset,
285285
String? using}) async {
286-
_logger.info('Get all channel metadata API call');
286+
_logger.silly('Get all channel metadata API call');
287287
keyset ??= _core.keysets[using];
288288

289289
var include = <String>{};

pubnub/lib/src/dx/pam/pam.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ mixin PamDx on Core {
4545
bool? join,
4646
Keyset? keyset,
4747
String? using}) async {
48-
_logger.info('Grant API call');
48+
_logger.silly('Grant API call');
4949
keyset ??= keysets[using];
5050
Ensure(keyset.secretKey).isNotNull('secretKey');
5151

@@ -104,7 +104,7 @@ mixin PamDx on Core {
104104
}
105105

106106
Future<Token> grantToken(TokenRequest tokenRequest) {
107-
_logger.info('Grant token API call');
107+
_logger.silly('Grant token API call');
108108
return tokenRequest.send();
109109
}
110110

@@ -119,7 +119,7 @@ mixin PamDx on Core {
119119

120120
Future<PamRevokeTokenResult> revokeToken(String token,
121121
{String? using, Keyset? keyset}) async {
122-
_logger.info('Revoke token API call');
122+
_logger.silly('Revoke token API call');
123123
keyset ??= keysets[using];
124124

125125
Ensure(keyset.secretKey).isNotNull('secretKey');

pubnub/lib/src/dx/presence/presence.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mixin PresenceDx on Core {
1919
Set<String> channels = const {},
2020
Set<String> channelGroups = const {},
2121
StateInfo? stateInfo}) async {
22-
_logger.info('Here now API call');
22+
_logger.silly('Here now API call');
2323
keyset ??= keysets[using];
2424

2525
Ensure(keyset).isNotNull('keyset');
@@ -47,7 +47,7 @@ mixin PresenceDx on Core {
4747
Set<String> channels = const {},
4848
Set<String> channelGroups = const {},
4949
}) {
50-
_logger.info('Announce leave API call');
50+
_logger.silly('Announce leave API call');
5151
keyset ??= keysets[using];
5252

5353
Ensure(keyset).isNotNull('keyset');
@@ -74,7 +74,7 @@ mixin PresenceDx on Core {
7474
Set<String> channels = const {},
7575
Set<String> channelGroups = const {},
7676
int? heartbeat}) {
77-
_logger.info('Announce heartbeat API call');
77+
_logger.silly('Announce heartbeat API call');
7878
keyset ??= keysets[using];
7979

8080
Ensure(keyset).isNotNull('keyset');
@@ -99,7 +99,7 @@ mixin PresenceDx on Core {
9999
String? using,
100100
Set<String> channels = const {},
101101
Set<String> channelGroups = const {}}) async {
102-
_logger.info('Get state API call');
102+
_logger.silly('Get state API call');
103103
keyset ??= keysets[using];
104104

105105
Ensure(keyset).isNotNull('keyset');
@@ -124,7 +124,7 @@ mixin PresenceDx on Core {
124124
String? using,
125125
Set<String> channels = const {},
126126
Set<String> channelGroups = const {}}) async {
127-
_logger.info('Set state API call');
127+
_logger.silly('Set state API call');
128128
keyset ??= keysets[using];
129129

130130
Ensure(keyset).isNotNull('keyset');

pubnub/lib/src/dx/publish/publish.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ mixin PublishDx on Core {
4444
int? ttl,
4545
bool? fire,
4646
String? customMessageType}) async {
47-
_logger.info('Publish API call');
47+
_logger.silly('Publish API call');
4848
Ensure(channel).isNotEmpty('channel name');
4949
Ensure(message).isNotNull('message');
5050

pubnub/lib/src/dx/push/push.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mixin PushNotificationDx on Core {
3333
int? count,
3434
Keyset? keyset,
3535
String? using}) async {
36-
_logger.info('List push channels API call');
36+
_logger.silly('List push channels API call');
3737
keyset ??= keysets[using];
3838

3939
Ensure(deviceId).isNotEmpty('deviceId');
@@ -82,7 +82,7 @@ mixin PushNotificationDx on Core {
8282
Environment? environment,
8383
Keyset? keyset,
8484
String? using}) async {
85-
_logger.info('Add push channels API call');
85+
_logger.silly('Add push channels API call');
8686
keyset ??= keysets[using];
8787

8888
Ensure(deviceId).isNotEmpty('deviceId');
@@ -124,7 +124,7 @@ mixin PushNotificationDx on Core {
124124
Environment? environment,
125125
Keyset? keyset,
126126
String? using}) async {
127-
_logger.info('Remove push channels API call');
127+
_logger.silly('Remove push channels API call');
128128
keyset ??= keysets[using];
129129

130130
Ensure(deviceId).isNotEmpty('deviceId');
@@ -159,7 +159,7 @@ mixin PushNotificationDx on Core {
159159
Environment? environment,
160160
Keyset? keyset,
161161
String? using}) async {
162-
_logger.info('Remove device API call');
162+
_logger.silly('Remove device API call');
163163
keyset ??= keysets[using];
164164

165165
Ensure(deviceId).isNotEmpty('deviceId');

0 commit comments

Comments
 (0)