Merge branch 'mkirk/more-logging' into release/2.31.0

pull/1/head
Michael Kirk 7 years ago
commit 29ba1bd341

@ -168,7 +168,10 @@ static const CGFloat kAttachmentUploadProgressTheta = 0.001f;
return; return;
} }
OWSLogInfo(@"Uploaded attachment: %p.", attachmentStream.uniqueId); OWSLogInfo(@"Uploaded attachment: %p serverId: %llu, byteCount: %u",
attachmentStream.uniqueId,
attachmentStream.serverId,
attachmentStream.byteCount);
attachmentStream.serverId = serverId; attachmentStream.serverId = serverId;
attachmentStream.isUploaded = YES; attachmentStream.isUploaded = YES;
[attachmentStream saveAsyncWithCompletionBlock:^{ [attachmentStream saveAsyncWithCompletionBlock:^{

@ -143,6 +143,16 @@ NSString *const kNSNotification_OWSWebSocketStateDidChange = @"kNSNotification_O
#pragma mark - #pragma mark -
NSString *NSStringFromOWSWebSocketType(OWSWebSocketType type)
{
switch (type) {
case OWSWebSocketTypeDefault:
return @"Default";
case OWSWebSocketTypeUD:
return @"UD";
}
}
// OWSWebSocket's properties should only be accessed from the main thread. // OWSWebSocket's properties should only be accessed from the main thread.
@interface OWSWebSocket () <SRWebSocketDelegate> @interface OWSWebSocket () <SRWebSocketDelegate>
@ -563,11 +573,12 @@ NSString *const kNSNotification_OWSWebSocketStateDidChange = @"kNSNotification_O
[socketMessage didFailBeforeSending]; [socketMessage didFailBeforeSending];
return; return;
} }
OWSLogVerbose(@"message scheduled: %llu, %@, %@, %zd.", OWSLogInfo(@"making request: %llu, %@: %@, jsonData.length: %zd, socketType: %@",
socketMessage.requestId, socketMessage.requestId,
request.HTTPMethod, request.HTTPMethod,
requestPath, requestPath,
jsonData.length); jsonData.length,
NSStringFromOWSWebSocketType(self.webSocketType));
const int64_t kSocketTimeoutSeconds = 10; const int64_t kSocketTimeoutSeconds = 10;
__weak TSSocketMessage *weakSocketMessage = socketMessage; __weak TSSocketMessage *weakSocketMessage = socketMessage;
@ -592,7 +603,7 @@ NSString *const kNSNotification_OWSWebSocketStateDidChange = @"kNSNotification_O
{ {
OWSAssertDebug(message); OWSAssertDebug(message);
OWSLogInfo(@"received WebSocket response."); OWSLogInfo(@"received WebSocket response requestId: %llu, status: %u", message.requestID, message.status);
DispatchMainThreadSafe(^{ DispatchMainThreadSafe(^{
[self requestSocketAliveForAtLeastSeconds:kMakeRequestKeepSocketAliveDurationSeconds]; [self requestSocketAliveForAtLeastSeconds:kMakeRequestKeepSocketAliveDurationSeconds];

Loading…
Cancel
Save