Obs!
Tilgang til denne siden krever autorisasjon. Du kan prøve å logge på eller endre kataloger.
Tilgang til denne siden krever autorisasjon. Du kan prøve å endre kataloger.
The client logs can help when we want to get more details while debugging an issue. To collect client logs, you can use @azure/logger, which is used by WebJS calling SDK internally.
import { setLogLevel, createClientLogger, AzureLogger } from '@azure/logger';
setLogLevel('verbose');
let logger = createClientLogger('ACS');
const callClient = new CallClient({ logger });
// Redirect ACS Calling SDK's logs
AzureLogger.log = (...args) => {
// To console, file, buffer, REST API, etc...
console.log(...args);
};
// Application logging
logger.info('....');
@azure/logger supports four different log levels:
- verbose
- info
- warning
- error
For debugging purposes, info
level logging is sufficient in most cases.
In the browser environment, @azure/logger outputs logs to the console by default.
You can redirect logs by overriding AzureLogger.log
method. For more information, see @azure/logger.
Your app might keep logs in memory if it has a 'download log file' feature. If that is the case, you have to set a limit on the log size. Not setting a limit might cause memory issues on long running calls.
Additionally, if you send logs to a remote service, consider mechanisms such as compression and scheduling. If the client has insufficient bandwidth, sending a large amount of log data in a short period of time can affect call quality.