Programmable Video | Feb. 19, 2020

Voice Client JS 1.10 - loglevel Logger Integration

This release introduces loglevellogger integration to enable flexibility in handling log messages by allowing integration with other loggers and dynamic log level setting. Prior to this release, Voice Client JS logging could only be configured during Device.setup. With this release, Voice Client JS exposes a loglevel based logger which allows for runtime logging configuration that includes setting the log level to “trace”, “debug”, “info”, “warn”, and “error”. Loglevel is a versatile logger library that includes level-based logging and filtering, and provides a plugin API to enable functionality such as sending the log messages to a log server.

For example, to enable logging:

import { getLogger } from 'loglevel';
const logger = getLogger(Device.packageName);
// Set log level on subsequent page loads and refreshes
logger.setLevel('DEBUG');

Voice GA