Add more logs to JWT service code
This commit is contained in:
@@ -41,13 +41,16 @@ export async function getSFUConfigWithOpenID(
|
|||||||
// if the call has a livekit service URL, try it.
|
// if the call has a livekit service URL, try it.
|
||||||
if (groupCall.livekitServiceURL) {
|
if (groupCall.livekitServiceURL) {
|
||||||
try {
|
try {
|
||||||
logger.info(`Trying to get JWT from ${groupCall.livekitServiceURL}...`);
|
logger.info(
|
||||||
|
`Trying to get JWT from call's configured URL of ${groupCall.livekitServiceURL}...`
|
||||||
|
);
|
||||||
const sfuConfig = await getLiveKitJWT(
|
const sfuConfig = await getLiveKitJWT(
|
||||||
client,
|
client,
|
||||||
groupCall.livekitServiceURL,
|
groupCall.livekitServiceURL,
|
||||||
roomName,
|
roomName,
|
||||||
openIdToken
|
openIdToken
|
||||||
);
|
);
|
||||||
|
logger.info(`Got JWT from call state event URL.`);
|
||||||
|
|
||||||
return sfuConfig;
|
return sfuConfig;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -71,9 +74,12 @@ export async function getSFUConfigWithOpenID(
|
|||||||
openIdToken
|
openIdToken
|
||||||
);
|
);
|
||||||
|
|
||||||
logger.info(`Updating call livekit service URL with: ${urlFromConf}...`);
|
logger.info(
|
||||||
|
`Got JWT, updating call livekit service URL with: ${urlFromConf}...`
|
||||||
|
);
|
||||||
try {
|
try {
|
||||||
await groupCall.updateLivekitServiceURL(urlFromConf);
|
await groupCall.updateLivekitServiceURL(urlFromConf);
|
||||||
|
logger.info(`Call livekit service URL updated.`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`Failed to update call livekit service URL: continuing anyway.`
|
`Failed to update call livekit service URL: continuing anyway.`
|
||||||
|
|||||||
Reference in New Issue
Block a user