Skip to content

Commit

Permalink
Make some logs a bit more descriptive (#3006)
Browse files Browse the repository at this point in the history
  • Loading branch information
hensmi-amazon authored Nov 20, 2024
1 parent e9f0ea0 commit b913cef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Set starting send bitrate to 1000kbps to reduce time of low resolution at start of connection
- Add per-frame encoding time in video encoding CPU connection health policy
- Replace substr with substring
- Improve some log strings

### Fixed

Expand Down
6 changes: 3 additions & 3 deletions src/signalingclient/DefaultSignalingClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,16 +437,16 @@ export default class DefaultSignalingClient implements SignalingClient {
this.webSocket.addEventListener('close', this.closeEventHandler);
this.webSocket.addEventListener('error', () => {
if (this.isClosing && !this.wasOpened) {
this.logger.info('ignoring error closing signaling while connecting');
this.logger.info('Signaling WebSocket ignoring error closing while connecting');
return;
}
if (this.wasOpened) {
this.logger.error('received error while connected');
this.logger.error('Signaling WebSocket received error while connected');
this.sendEvent(
new SignalingClientEvent(this, SignalingClientEventType.WebSocketError, null)
);
} else {
this.logger.error('failed to connect');
this.logger.error('Signaling WebSocket received error while connecting');
this.sendEvent(
new SignalingClientEvent(this, SignalingClientEventType.WebSocketFailed, null)
);
Expand Down
2 changes: 1 addition & 1 deletion src/task/SendAndReceiveDataMessagesTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class SendAndReceiveDataMessagesTask
messageFrame.messages = [message];
this.context.signalingClient.sendDataMessage(messageFrame);
} else {
this.context.logger.error('Signaling client is not ready');
this.context.logger.error('Cannot send data message because signaling client is not ready');
}
};

Expand Down

0 comments on commit b913cef

Please sign in to comment.