code: function logReadableStream(stream) {
          var encoding = "utf8";
  
          stream.setEncoding(encoding);
  
          stream.on("data", function (chunk) {
              writeToLog(chunk, encoding);
          });
      }
docs: Listen for data on a readable stream, write to the log file
  
  @param {stream.Readable} stream