Winston: Attempt to write logs with no transports : <p>I'm trying to set up an access log and an error log for my express server using Winston, but I seem to be doing something wrong.</p>

<p>Here is my attempt at a config file:</p>

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

const tsFormat = () =&gt; (new Date()).toLocaleTimeString();
winston.loggers.add('errorLog', {
        file: {
                filename: '&lt;path&gt;/errors.log', //&lt;path&gt; is replaced by the 
                timestamp: tsFormat,           //absolute path of the log
                level: 'info'
        }

});
winston.loggers.add('accessLog', {
        file: {
                filename: '&lt;path&gt;/access.log', //same as before
                timestamp: tsFormat,
                level: 'info'
        }
});
</code></pre>

<p>And this is how I'm including it in my other files:</p>

<pre><code>var winston = require('winston'),
    accessLog = winston.loggers.get('accessLog'),
    errorLog = winston.loggers.get('errorLog');
</code></pre>

<p>This seems to me like it follows the documentation (<a href="https://github.com/winstonjs/winston/tree/2.4.0#working-with-multiple-loggers-in-winston" rel="noreferrer">https://github.com/winstonjs/winston/tree/2.4.0#working-with-multiple-loggers-in-winston</a>)
but I'm getting this error when I try to log to it:</p>

<pre><code>[winston] Attempt to write logs with no transports {"message":"pls","level":"info"}
[winston] Attempt to write logs with no transports {"message":"Bad request: undefined","level":"warn"}
</code></pre>

<p>Any help would be greatly appreciated, I've been pretty stumped for a couple days now.</p>
