winstonjs / node-loggly

A client implementation for Loggly in node.js
http://github.com/winstonjs/node-loggly
Other
233 stars 80 forks source link

callback function problems #6

Closed kordless closed 13 years ago

kordless commented 13 years ago

I'm getting errors when an error callback is trying to be called:

root@ubuntu:/home/kord/code# node foo.js 401

/usr/local/lib/node/.npm/loggly/0.3.1/package/lib/loggly/interns.js:122 callback(new Error('Loggly Error (' + statusCode + '): ' + failCodes ^ TypeError: object is not a function at Object.CALL_NON_FUNCTION (native) at [object Object].callback (/usr/local/lib/node/.npm/loggly/0.3.1/package/lib/loggly/interns.js:122:20) at IncomingMessage. (/usr/local/lib/node/.npm/request/1.9.0/package/main.js:214:44) at IncomingMessage.emit (events.js:59:20) at HTTPParser.onMessageComplete (http.js:111:23) at CleartextStream.ondata (http.js:1140:22) at CleartextStream._push (tls.js:263:27) at SecurePair._cycle (tls.js:514:18) at EncryptedStream.write (tls.js:72:13) at Socket.ondata (stream.js:15:26)

Here's the code I'm calling it with:

geekceo.facet('date', '404', { rows: 1 }, function (err, results) { //do something } );

kordless commented 13 years ago

I was running off the docs on Loggly's wiki, which have been subsequently updated here. Apologies.

kordless commented 13 years ago

I've added markdown support to Loggly's wiki so the README file can be sync'd over in it's original .md format.

indexzero commented 13 years ago

Awesome. Going to put in a check for this and I'll push 0.3.2