nl_tokens: Send log message to all available wrappers
pl_tokens: function sendMessage ( id , level , fallbackToLog , ... rest ) { const levelMethod = level . toLowerCase ( ) ; const options = buildMessageOptions ( id ) ; const tagsToDisable = get ( configRegistry , 'tags.disable' , [ ] ) ; const namespaceTags = get ( configRegistry , ` ${ id } ` , [ ] ) ; const containsDisabledTag = tagsToDisable . some ( ( element ) => { return namespaceTags . indexOf ( element ) > - 1 ; } ) ; if ( options . disable . indexOf ( level ) > - 1 || containsDisabledTag ) { // if global or logger's setting is saying to disable logging, proceed silently if ( ! ! configRegistry . verbose ) { console . log ( ` ${ level } ${ id } ` ) ; } return ; } const [ , , stats , ... args ] = applyPlugins ( pluginsRegistry , id , level , calcStats ( ) , ... rest ) ; wrappers . concat ( options . wrappers ) . forEach ( ( wrapper ) => { const restOrArgs = equalsWrapperOptValue ( wrapper , 'passInitialArguments' , true ) ? rest : args ; const plugins = extractWrapperPlugins ( <mask> ) ; const [ , , wrapperStats , ... wrapperArgs ] = applyPlugins ( plugins , id , level , stats , ... restOrArgs ) ; if ( typeof wrapper [ levelMethod ] === 'function' ) { // use specific logging method if exists, for example, wrapper.info() return wrapper [ levelMethod ] ( id , wrapperStats , ... wrapperArgs ) ; } else if ( typeof wrapper . log === 'function' && ! ! fallbackToLog ) { // use generic log method, if fallbackToLog === true. It is always equal to TRUE for standard levels return wrapper . log ( id , level , wrapperStats , ... wrapperArgs ) ; } if ( ! ! configRegistry . verbose ) { console . log ( ` ${ fallbackToLog } ` ) ; } } ) ; }