logdna / nodejs

Node.js library for logging to LogDNA
MIT License
74 stars 66 forks source link

`create` vs `createLogger` #2

Closed bpartridge83 closed 8 years ago

bpartridge83 commented 8 years ago

The createLogger function is returned from lib/logger.js, but it's being assigned to the global space as create:

https://github.com/logdna/nodejs/blob/master/index.js#L2

So, this fails:

const Logger = require('logdna');
let logger = Logger.createLogger(...

But Logger.create is working as createLogger is documented.

respectus commented 8 years ago

Ah I see, thanks for catching that. I should have tested the module as found on npm. I have edited the index.js file to properly expose the name createLogger in the global space. I appreciate the feedback, please don't hesitate to let me know any other improvements I can make. Thanks Brian!