Skip to content

Commit

Permalink
Fixed log format for logger.error().
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Dec 31, 2019
1 parent ae529ee commit ca3a022
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/src/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ load(dst, src) {
fun(src, dst);
});
} catch (e) {
logger.error(e.toString());
logger.error('Failed to load config: ${e.toString()}');
throw e;
}
}
8 changes: 4 additions & 4 deletions lib/src/rtc_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ class RTCSession extends EventManager {
if (this._status == C.STATUS_TERMINATED) {
return;
}
logger.error(error.toString());
logger.error('Failed to answer(): ${error.toString()}');
}
}

Expand Down Expand Up @@ -1799,7 +1799,7 @@ class RTCSession extends EventManager {
}
sendAnswer(desc.sdp);
} catch (error) {
logger.error(error);
logger.error('Got anerror on re-INVITE: ${error.toString()}');
}
}

Expand Down Expand Up @@ -1863,7 +1863,7 @@ class RTCSession extends EventManager {
// Send answer.
sendAnswer(desc.sdp);
} catch (error) {
logger.error(error.toString());
logger.error('Got error on UPDATE: ${error.toString()}');
}
}

Expand Down Expand Up @@ -2195,7 +2195,7 @@ class RTCSession extends EventManager {
if (this._status == C.STATUS_TERMINATED) {
return;
}
logger.error(error);
logger.error('Failed to _sendInitialRequest: ${error.toString()}');
throw error;
}
}
Expand Down
1 change: 0 additions & 1 deletion lib/src/socket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ isSocket(socket) {

if (socket == null) {
logger.error('null DartSIP.Socket instance');

return false;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/ua.dart
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ class UA extends EventManager {
this._transport.ondisconnect = onTransportDisconnect;
this._transport.ondata = onTransportData;
} catch (e) {
logger.error(e);
logger.error('Failed to _loadConfig: ${e.toString()}');
throw new Exceptions.ConfigurationError(
'sockets', this._configuration.sockets);
}
Expand Down

0 comments on commit ca3a022

Please sign in to comment.