Skip to content

Commit

Permalink
log: Log colibri2 requests/responses with context from the Conference. (
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrozev authored Sep 28, 2023
1 parent 13803c8 commit 30dcf51
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions jvb/src/main/java/org/jitsi/videobridge/Conference.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ public Conference(Videobridge videobridge,
{
try
{
logger.info("RECV colibri2 request: " + request.getRequest().toXML());
long start = System.currentTimeMillis();
Pair<IQ, Boolean> p = colibri2Handler.handleConferenceModifyIQ(request.getRequest());
IQ response = p.getFirst();
Expand All @@ -244,6 +245,7 @@ public Conference(Videobridge videobridge,
logger.warn("Took " + processingDelay + " ms to process an IQ (total delay "
+ totalDelay + " ms): " + request.getRequest().toXML());
}
logger.info("SENT colibri2 response: " + response.toXML());
request.getCallback().invoke(response);
if (expire) videobridge.expireConference(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ public BridgeChannelMessage sourceVideoType(SourceVideoTypeMessage sourceVideoTy

Conference conference = endpoint.getConference();

if (conference == null || conference.isExpired())
if (conference.isExpired())
{
getLogger().warn("Unable to forward SourceVideoTypeMessage, conference is null or expired");
getLogger().warn("Unable to forward SourceVideoTypeMessage, conference is expired");
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ class XmppConnection : IQListener {
if (iq == null) {
return null
}
logger.cdebug { "RECV: ${iq.toXML()}" }
// colibri2 requests are logged at the conference level.
if (iq !is ConferenceModifyIQ) {
logger.cdebug { "RECV: ${iq.toXML()}" }
}

return when (iq.type) {
IQ.Type.get, IQ.Type.set -> handleIqRequest(iq, mucClient)?.also {
Expand All @@ -208,7 +211,6 @@ class XmppConnection : IQListener {
handler.colibriRequestReceived(
ColibriRequest(iq, colibriDelayStats, colibriProcessingDelayStats) { response ->
response.setResponseTo(iq)
logger.debug { "SENT: ${response.toXML()}" }
mucClient.sendStanza(response)
}
)
Expand Down

0 comments on commit 30dcf51

Please sign in to comment.