mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: unify debug message in connect() methods
parent
142348fcef
commit
cff5e634f5
|
@ -453,6 +453,8 @@ public class PublisherEndpoint extends MediaEndpoint {
|
||||||
private void internalSinkConnect(final MediaElement source, final MediaElement sink, boolean blocking) {
|
private void internalSinkConnect(final MediaElement source, final MediaElement sink, boolean blocking) {
|
||||||
if (blocking) {
|
if (blocking) {
|
||||||
source.connect(sink);
|
source.connect(sink);
|
||||||
|
log.debug("EP {}: Elements have been connected (source {} -> sink {})", getEndpointName(), source.getId(),
|
||||||
|
sink.getId());
|
||||||
} else {
|
} else {
|
||||||
source.connect(sink, new Continuation<Void>() {
|
source.connect(sink, new Continuation<Void>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -463,7 +465,7 @@ public class PublisherEndpoint extends MediaEndpoint {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable cause) throws Exception {
|
public void onError(Throwable cause) throws Exception {
|
||||||
log.warn("EP {}: Failed to connect media elements (source {} -> sink {})", getEndpointName(),
|
log.warn("EP {}: Elements failed connecting (source {} -> sink {})", getEndpointName(),
|
||||||
source.getId(), sink.getId(), cause);
|
source.getId(), sink.getId(), cause);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -488,18 +490,20 @@ public class PublisherEndpoint extends MediaEndpoint {
|
||||||
} else {
|
} else {
|
||||||
if (blocking) {
|
if (blocking) {
|
||||||
source.connect(sink, type);
|
source.connect(sink, type);
|
||||||
|
log.debug("EP {}: {} elements have been connected (source {} -> sink {})", getEndpointName(), type,
|
||||||
|
source.getId(), sink.getId());
|
||||||
} else {
|
} else {
|
||||||
source.connect(sink, type, new Continuation<Void>() {
|
source.connect(sink, type, new Continuation<Void>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Void result) throws Exception {
|
public void onSuccess(Void result) throws Exception {
|
||||||
log.debug("EP {}: {} media elements have been connected (source {} -> sink {})",
|
log.debug("EP {}: {} elements have been connected (source {} -> sink {})", getEndpointName(),
|
||||||
getEndpointName(), type, source.getId(), sink.getId());
|
type, source.getId(), sink.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable cause) throws Exception {
|
public void onError(Throwable cause) throws Exception {
|
||||||
log.warn("EP {}: Failed to connect {} media elements (source {} -> sink {})", getEndpointName(),
|
log.warn("EP {}: {} elements failed connecting (source {} -> sink {})", getEndpointName(), type,
|
||||||
type, source.getId(), sink.getId(), cause);
|
source.getId(), sink.getId(), cause);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -510,6 +514,8 @@ public class PublisherEndpoint extends MediaEndpoint {
|
||||||
if (!RemoteOperationUtils.mustSkipRemoteOperation()) {
|
if (!RemoteOperationUtils.mustSkipRemoteOperation()) {
|
||||||
if (blocking) {
|
if (blocking) {
|
||||||
source.disconnect(sink);
|
source.disconnect(sink);
|
||||||
|
log.debug("EP {}: Elements have been disconnected (source {} -> sink {})", getEndpointName(),
|
||||||
|
source.getId(), sink.getId());
|
||||||
} else {
|
} else {
|
||||||
source.disconnect(sink, new Continuation<Void>() {
|
source.disconnect(sink, new Continuation<Void>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -520,7 +526,7 @@ public class PublisherEndpoint extends MediaEndpoint {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable cause) throws Exception {
|
public void onError(Throwable cause) throws Exception {
|
||||||
log.warn("EP {}: Failed to disconnect media elements (source {} -> sink {})", getEndpointName(),
|
log.warn("EP {}: Elements failed disconnecting (source {} -> sink {})", getEndpointName(),
|
||||||
source.getId(), sink.getId(), cause);
|
source.getId(), sink.getId(), cause);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -547,17 +553,19 @@ public class PublisherEndpoint extends MediaEndpoint {
|
||||||
} else {
|
} else {
|
||||||
if (blocking) {
|
if (blocking) {
|
||||||
source.disconnect(sink, type);
|
source.disconnect(sink, type);
|
||||||
|
log.debug("EP {}: {} elements have been disconnected (source {} -> sink {})", getEndpointName(),
|
||||||
|
type, source.getId(), sink.getId());
|
||||||
} else {
|
} else {
|
||||||
source.disconnect(sink, type, new Continuation<Void>() {
|
source.disconnect(sink, type, new Continuation<Void>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Void result) throws Exception {
|
public void onSuccess(Void result) throws Exception {
|
||||||
log.debug("EP {}: {} media elements have been disconnected (source {} -> sink {})",
|
log.debug("EP {}: {} elements have been disconnected (source {} -> sink {})",
|
||||||
getEndpointName(), type, source.getId(), sink.getId());
|
getEndpointName(), type, source.getId(), sink.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable cause) throws Exception {
|
public void onError(Throwable cause) throws Exception {
|
||||||
log.warn("EP {}: Failed to disconnect {} media elements (source {} -> sink {})",
|
log.warn("EP {}: {} elements failed disconnecting (source {} -> sink {})",
|
||||||
getEndpointName(), type, source.getId(), sink.getId(), cause);
|
getEndpointName(), type, source.getId(), sink.getId(), cause);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue