nl_tokens: defaultTransformer takes arguments from a bunyan WritableStream s write method and formats output in a standard way that can be interpreted by parent process .
pl_tokens: function defaultTransformer ( ... args ) { try { let [ record , ... rest ] = args try { record = typeof record === 'string' ? JSON . parse ( record ) : record } catch ( err ) { return { type : 'bunyan' , record : { err : new <mask> ( 'Could not parse message.' ) } } } return { type : 'bunyan' , record } } catch ( err ) { return { type : 'bunyan' , record : { err : new Error ( 'Internal error occurred.' ) } } } }