winstonjs / node-loggly

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

Allow tags to be send by URL instead of HTTP header #37

Closed viggeh closed 10 years ago

viggeh commented 10 years ago

This is a pull request for a temporary fix for this issue https://github.com/nodejitsu/node-loggly/issues/35

It allows the selection of sending tags as part of the URI instead of the HTTP header X-LOGGLY-TAG. To use the URI option, do:

    var loggly = require('loggly');

    var client = loggly.createClient({
      token: "your-really-long-input-token",
      subdomain: "your-subdomain",
      auth: {
        username: "your-username",
        password: "your-password"
      },
      useTagHeader: false
    });

If the option is not set, the client will behave as it would normally.

christiaanwesterbeek commented 10 years ago

Thanks. This seems like a clean way to work around the original problem using configuration.

smebberson commented 10 years ago

Any chance this change can be published via npm?

jcrugzz commented 10 years ago

LGTM.

jcrugzz commented 10 years ago

@smebberson done :)

smebberson commented 10 years ago

Awesome! Thank you. It's great to see some response on the nodejitsu stuff. So many great libraries that you guys have.