dylang / logging

Lightweight informative modern console logging.
MIT License
54 stars 13 forks source link

TypeError: createLogger is not a function #8

Open exsilium opened 7 years ago

exsilium commented 7 years ago

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
gavynriebau commented 7 years ago

@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');
stevage commented 6 years ago

Yeah I think somewhere in the process of updating to use the new module syntax, the old syntax got broken.