src/node.js
function getStreams(config) {
  const streams = Array.isArray(config.streams)
    ? [...config.streams]
    : [];

  // Nice output to stdout
  if (config.stdout) {
    streams.push({
      name: 'stdout',
      level: config.level,
      stream: bunyanFormat({ outputMode: 'short' }),
      type: 'stream',
    });
  }

  // Rollbar Transport
  // Messages at the warn level or higher are transported to Rollbar
  // Messages with an `err` and/or `req` data params are handled specially
  if (config.rollbarToken) {
    streams.push({
      name: 'rollbar',
      level: 'warn',
      stream: new ServerRollbarLogger({
        token: config.rollbarToken,
        environment: config.environment,
        codeVersion: config.codeVersion,
      }),
      type: 'raw',
    });
  }

  // Transport server logs
  if (config.logentriesToken) {
    streams.push(new ServerLogentriesLogger({
      name: config.name,
      token: config.logentriesToken,
      level: config.level,
    }));
  }

  return streams;
}
function getStreams(config) {
  const streams = Array.isArray(config.streams)
    ? [...config.streams]
    : [];

  // Nice output to stdout
  if (config.stdout) {
    streams.push({
      name: 'stdout',
      level: config.level,
      stream: bunyanFormat({ outputMode: 'short' }),
      type: 'stream',
    });
  }

  // Rollbar Transport
  // Messages at the warn level or higher are transported to Rollbar
  // Messages with an `err` and/or `req` data params are handled specially
  if (config.rollbarToken) {
    streams.push({
      name: 'rollbar',
      level: 'warn',
      stream: new ServerRollbarLogger({
        token: config.rollbarToken,
        environment: config.environment,
        codeVersion: config.codeVersion,
      }),
      type: 'raw',
    });
  }

  // Transport server logs
  if (config.logentriesToken) {
    streams.push(new ServerLogentriesLogger({
      name: config.name,
      token: config.logentriesToken,
      level: config.level,
    }));
  }

  return streams;
}
function getStreams ( config ) { const streams = Array . isArray ( config . streams ) ? [ ... config . streams ] : [ ] ; // Nice output to stdout if ( config . stdout ) { streams . push ( { name : 'stdout' , level : config . level , stream : bunyanFormat ( { outputMode : 'short' } ) , type : 'stream' , } ) ; } // Rollbar Transport // Messages at the warn level or higher are transported to Rollbar // Messages with an `err` and/or `req` data params are handled specially if ( config . rollbarToken ) { streams . push ( { name : 'rollbar' , level : 'warn' , stream : new ServerRollbarLogger ( { token : config . rollbarToken , environment : config . environment , codeVersion : config . codeVersion , } ) , type : 'raw' , } ) ; } // Transport server logs if ( config . logentriesToken ) { streams . push ( new ServerLogentriesLogger ( { name : config . name , token : config . logentriesToken , level : config . level , } ) ) ; } return streams ; }
Add standard Node logger streams to `config.streams`
@private
@param  {Object} config
@param  {Array?} config.streams
@returns {Array}
Add standard Node logger streams to config . streams