@@ -8,7 +8,7 @@ A client implementation for Loggly in node.js. Check out Loggly's [Node logging
##Usage
The `node-loggly` library is compliant with the [Loggly API][api]. Using `node-loggly` is easy for a variety of scenarios: logging, working with devices and inputs, searching, and facet searching.
The `node-loggly-bulk` library is compliant with the [Loggly API][api]. Using `node-loggly-bulk` is easy for a variety of scenarios: logging, working with devices and inputs, searching, and facet searching.
###Getting Started
Before we can do anything with Loggly, we have to create a client with valid credentials. We will authenticate for you automatically:
@@ -31,7 +31,7 @@ Before we can do anything with Loggly, we have to create a client with valid cre
```
###Logging
There are two ways to send log information to Loggly via node-loggly. The first is to simply call client.log with an appropriate input token:
There are two ways to send log information to Loggly via node-loggly-bulk. The first is to simply call client.log with an appropriate input token:
``` js
client.log('127.0.0.1 - Theres no place like home', function (err, result) {
@@ -120,7 +120,7 @@ It is possible to send arrays, which will result in one single request to Loggly
```
###Searching
[Searching][search-api] with node-loggly is easy. All you have to do is use the search() method defined on each Loggly client:
[Searching][search-api] with node-loggly-bulk is easy. All you have to do is use the search() method defined on each Loggly client:
``` js
var util =require('util');
@@ -152,13 +152,15 @@ See the [Loggly search guide][search] for more details on how to effectively sea
$ curl http://npmjs.org/install.sh | sh
```
###Installing node-loggly
###Installing node-loggly-bulk
``` bash
$ npm install loggly
```
##Run Tests
All of the node-loggly tests are written in [vows][vows], and cover all of the use cases described above. You will need to add your Loggly username, password, subdomain, and a two test inputs to test/data/test-config.json before running tests. When configuring the test inputs on Loggly, the first test input should be named 'test' using the HTTP service. The second input should be name 'test_json' using the HTTP service with the JSON logging option enabled:
###Run Tests by sending events to your Loggly Account
All of the node-loggly-bulk tests are written in [vows][vows], and cover all of the use cases described above. You will need to add your Loggly username, password, subdomain, and your loggly token to test/config.json before running tests.
``` js
{
@@ -176,6 +178,11 @@ Once you have valid Loggly credentials you can run tests with [vows][vows]:
``` bash
$ npm test
```
###Run Tests with Mock HTTP Request
To mock the HTTP requests and run test cases in your local machine you can run the following command
"should return a valid customer": function(err,customer){
assert.isNull(err);
assert.isArray(customer.tokens);
assert.isString(customer.subdomain);
assert.isObject(customer.subscription);
}
}
}
}).export(module);
Oops, something went wrong.
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
Learn more.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
You can always update your selection by clicking Cookie Preferences at the bottom of the page.
For more information, see our Privacy Statement.
Essential cookies
We use essential cookies to perform essential website functions, e.g. they're used to log you in.
Learn more
Always active
Analytics cookies
We use analytics cookies to understand how you use our websites so we can make them better, e.g. they're used to gather information about the pages you visit and how many clicks you need to accomplish a task.
Learn more
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for bulk mode #1
Added support for bulk mode #1
Changes from all commits
460cd63File filter...
Jump to…