import debug from 'debug' ; import { Logger } from '../types' ; export const getLogger = ( identifier , isTest = false ) : Logger => { const testString = isTest ? 'test:' : '' ; return { debug : debug ( `${ testString }debug:${ identifier }` ) , info : debug ( `${ testString }info:${ identifier }` ) , warn : debug ( `${ testString }warn:${ identifier }` ) , error : debug ( `${ testString }error:${ identifier }` ) , } ; } ; export const logError = ( logger , message , e ) : void => { logger . error ( `${ message }. 
    Error: ${ e . message }. 
    Stack: ${ e . stack }` ) ; } ;