nl_tokens: Transform Message object to a string
pl_tokens: function format ( msg , formatter , electronLog , removeStyles ) { removeStyles = removeStyles !== undefined ? removeStyles : false ; if ( typeof formatter === 'function' ) { return formatter ( msg , electronLog ) ; } var date = new Date ( msg . date || Date . now ( ) ) ; var variables = msg . variables ; var result = formatter ; for ( var i in variables ) { if ( ! variables . hasOwnProperty ( i ) ) continue ; result = result . replace ( '{' + i + '}' , variables [ i ] ) ; } result = result . replace ( '{level}' , msg . level ) . replace ( '{text}' , stringifyArray ( msg . data ) ) . replace ( '{y}' , String ( <mask> . getFullYear ( ) ) ) . replace ( '{m}' , pad ( date . getMonth ( ) + 1 ) ) . replace ( '{d}' , pad ( date . getDate ( ) ) ) . replace ( '{h}' , pad ( date . getHours ( ) ) ) . replace ( '{i}' , pad ( date . getMinutes ( ) ) ) . replace ( '{s}' , pad ( date . getSeconds ( ) ) ) . replace ( '{ms}' , pad ( date . getMilliseconds ( ) , 3 ) ) . replace ( '{z}' , formatTimeZone ( date . getTimezoneOffset ( ) ) ) ; if ( removeStyles ) { result = result . replace ( / %c / g , '' ) ; } return result ; }