winston: Attempt to write logs with no transports - using default logger : <p>I followed a tutorial to set up winston (2.x) default logger in my express app. When updating to the current version of winston (3.0.0) I have a problem with adding the transports. I have followed the <a href="https://github.com/winstonjs/winston#using-the-default-logger" rel="noreferrer">latest docs</a> but still I get the notice in console and no log files are created at all:</p>

<blockquote>
  <p>[winston] Attempt to write logs with no transports</p>
</blockquote>

<p><em>logging.js</em></p>

<pre><code>const winston = require('winston');

module.exports = function () {

  const files = new winston.transports.File({ filename: 'logfile.log' });
  const myconsole = new winston.transports.Console();

  winston.add(myconsole);
  winston.add(files);

}
</code></pre>

<p><em>index.js</em></p>

<pre><code>const winston = require('winston');
...

require('./logging');
winston.info("Give some info");
</code></pre>

<blockquote>
  <p>[winston] Attempt to write logs with no transports
  {"message":"Give some info","level":"info"}</p>
</blockquote>

<p><strong>What am I doing wrong?</strong></p>
