ajbrown / angular-loggly-logger

An AngularJS module which sends your $log message to loggly, and provides a service for manually sending messages to loggly.
MIT License
32 stars 49 forks source link

Batch log requests #58

Open jaketodaro opened 8 years ago

jaketodaro commented 8 years ago

It would be nice to batch log messages that happen in quick succession. This would cut down on the number of network requests for errors that happen in tight loops, or anything else where multiple log messages are sent in quick succession. I'm not sure how to do this without potentially cutting off the last log messages if the user closes the page quickly after causing the log messages to be sent.

logger.batchLogDelay(1000) could make the logger wait 1000ms after receiving a log to send the original log and any logs that have been sent since the original one.

ajbrown commented 8 years ago

@jaketodaro This is something on my scratchpad for 1.0. I'll make this the official story for it :-) Thanks!