logging
logging copied to clipboard
TypeError: createLogger is not a function
Hi! I thought I'd test-drive this nice looking logging module. However, ran into an issue from the start go with node v6.10.1
and logging v3.2.0
via npm.
const createLogger = require('logging');
const log = createLogger('xmodem');
This results in:
const log = createLogger('xmodem');
^
TypeError: createLogger is not a function
@exsilium
I had the same issue, I think the docs are just out of date but if you try again using the following syntax it should work:
const createLogger = require('logging');
const log = createLogger.default('xmodem');
Yeah I think somewhere in the process of updating to use the new module syntax, the old syntax got broken.