title: Winston/Node.js how add a Transport only for certain environment?
body: <p>I have the follow configuration:</p>
  
  <pre><code>var winston = require('winston');
  var Mail = require('winston-mail').Mail;
  
  var logger = new (winston.Logger)({
    transports: [
      new (winston.transports.Console)({ level: 'info', colorize: true }),
      new (winston.transports.File)({ level: 'info', filename: './logs/logs.log',
      new (Mail)({
                to: 'xxxxxx@xxxxxx.xx',
                from: 'winston@xxxxx.xx',
                subject: 'Errors occurred',
                level: 'error',
                host: 'smtp.xxxxx.xx',
                username: 'xxxx@xxxx.xx', 
                password: 'xxxxx',
                port: xxx
              })
    ],
    exceptionHandlers: [
      new (winston.transports.Console)(),
      new (winston.transports.File)({ filename: './logs/exceptions.log' }),
      new (Mail)({
                to: 'xxxxxx@xxxxxx.xx',
                from: 'winston@xxxxx.xx',
                subject: 'Errors occurred',
                level: 'error',
                host: 'smtp.xxxxx.xx',
                username: 'xxxx@xxxx.xx', 
                password: 'xxxxx',
                port: xxx
              })
   ]
  });
  </code></pre>
  
  <p>I'd like add the Mail transport only for production environment not in staging or development.</p>
  
  <p>I set a different log level as follow:</p>
  
  <pre><code>if (process.env.NODE_ENV === 'development') {
    logger.transports.console.level = 'debug';
    logger.transports.file.level = 'debug';
  }
  </code></pre>
  
  <p>There is a way to do that also with transport?</p>