const clientB = new VonageClient({
loggingLevel: LoggingLevel.Error
});
// or setup custom loggers
const clientC = new VonageClient({
disableInternalLogger: true,
customLoggers: [
{
name: 'CustomLoggerOne',
minLogLevel: 'Debug', // or LoggingLevel.Debug
topics: ['HTTP', Topics.API],
onLog: (level, topic, message) => {
console.log(`${level} ${topic.name} ${topic.tag} ${message}`);
}
},
createVonageLogger('CustomLoggerTwo', (level, topic, message) => {
console.log(`${level} ${topic.name} ${topic.tag} ${message}`);
})
]
});
Represents the configuration object used to initialize the client.
The
ClientInitConfig
class provides a convenient way to configure the client by specifying various properties. These properties include all the ones in ClientConfigObject plus loggingLevel, customLoggers and disableInternalLogger.