import { Logger } from '../../libs/voicefocus/types' ; import SDKLogger from '../logger/Logger' ; internal function stringify ( args ) { return args . map ( ( v ) => { if ( typeof v === 'object' ) { return JSON . stringify ( v ) ; } return `${ v }` ; } ) . join ( ' ' ) ; } internal export default class LoggerAdapter implements Logger { constructor ( private base ) { } debug ( ... args ) { this . base . debug ( stringify ( args ) ) ; } info ( ... args ) { this . base . info ( stringify ( args ) ) ; } warn ( ... args ) { this . base . warn ( stringify ( args ) ) ; } error ( ... args ) { this . base . error ( stringify ( args ) ) ; } }