Closed freeall closed 10 years ago
@freeall can you add a test for this?
I didn't add one since there's no way to check for the result on Loggly. The test would do the same as the one already there. Basically just check we're passing an array and that the response is ok. You still want it?
I've added a test now.
Please note that when I ran the tests some of them them failed, but not the one I wrote. This also happened if I did a clean clone.
When using the node-loggly client the search() method when searching with chaining
✗ should return a set of valid search results
» expected null, got { stack: 'Error: Loggly Error (500): Internal Server Error\n at Request._callback (/Users/freeall/workspace/node_modules/node-loggly/lib/loggly/common.js:133:25)\n at Request.self.callback (/Users/freeall/workspace/node_modules/node-loggly/node_modules/request/request.js:129:22)\n at Request.EventEmitter.emit (events.js:98:17)\n at Request.options.Emitter.emit (/Users/freeall/workspace/node_modules/node-loggly/node_modules/vows/lib/vows.js:237:24)\n at Request.<anonymous> (/Users/freeall/workspace/node_modules/node-loggly/node_modules/request/request.js:873:14)\n at Request.EventEmitter.emit (events.js:117:20)\n at Request.options.Emitter.emit (/Users/freeall/workspace/node_modules/node-loggly/node_modules/vows/lib/vows.js:237:24)\n at IncomingMessage.<anonymous> (/Users/freeall/workspace/node_modules/node-loggly/node_modules/request/request.js:824:12)\n at IncomingMessage.EventEmitter.emit (events.js:117:20)\n at IncomingMessage.options.Emitter.emit (/Users/freeall/workspace/node_modules/node-loggly/node_modules/vows/lib/vows.js:237:24)', arguments: undefined, type: undefined, message: 'Loggly Error (500): Internal Server Error' } // common.js:133
When using the node-loggly client the search() method when searching without chaining
✗ should return a set of valid search results
» expected null, got . // helpers.js:52
✗ Broken » 10 honored ∙ 2 broken (9.392s)
Ping :) Would like to use this feature. Is it possible to merge it soon?
@freeall if airport wifi allows, Ill get this up and published. Thanks for the contribution!
Great, thanks!
There's a bug with this implementation. Tags are not being sent. See issue https://github.com/nodejitsu/node-loggly/issues/35
Fixes #31
With this change node-loggly can support the bulk endpoint from Loggly, http://www.loggly.com/docs/api-sending-data/#bulk.
Changes that the .log method can now take an array
client.log([ {iam:'number1'}, {iam:'number 2'} ])
.