mixu / minilog

Lightweight client & server-side logging with Stream-API backends
http://mixu.net/minilog/
Other
382 stars 51 forks source link

Added ability to send extra information #18

Closed ryanseddon closed 10 years ago

ryanseddon commented 10 years ago

I think cid format should be up to the user and with this PR they can do:

var logger = new Minilog.backends.jQuery();
logger.extras.cid = 1234567;

That will post:

{
   cid: 1234567,
   logs: [...]
}

If no extras are specified it will POST in the same format as it does now.

mixu/minilog#17

mixu commented 10 years ago

nice! however, to avoid breaking existing clients I think the cid stuff should work as before if extras is not set.

ryanseddon commented 10 years ago

@mixu makes sense, have done that now.

mixu commented 10 years ago

looks like self.url will keep growing in length with repeated calls to init, will fix

ryanseddon commented 10 years ago

@mixu derp, that's fixed now.

ryanseddon commented 10 years ago

Are you able to publish this to npm please.

mixu commented 10 years ago

Coincidentally, I was just doing that. Published as v2.0.4 a moment ago

mixu commented 10 years ago

Thanks again and sorry for the delay in publishing

ryanseddon commented 10 years ago

Awesome thank you!