logging icon indicating copy to clipboard operation
logging copied to clipboard

TypeError: createLogger is not a function

Open exsilium opened this issue 7 years ago • 2 comments

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 avatar May 26 '17 09:05 exsilium

@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');

gavynriebau avatar Aug 07 '17 11:08 gavynriebau

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

stevage avatar Oct 02 '17 11:10 stevage