nl_tokens: Generates a function that will perform logic required to update a log file with a new log entry .
pl_tokens: function getWriteFunction ( log ) { return function writeLogFile ( name , qcb ) { var dir = path . join ( LOG_DIR , name ) ; function readFile ( cb ) { fs . readFile ( dir , cb ) ; } function updateLogs ( logs , cb ) { logs . push ( log . toJSON ( ) ) ; cb ( null , logs ) ; } function writeFile ( str , cb ) { fs . writeFile ( dir , str , cb ) ; } async . waterfall ( [ readFile , safejson . <mask> , updateLogs , safejson . stringify , writeFile ] , qcb ) ; } ; }