Menu

#10 Send all pending entries on timed interval in batching mode

open
nobody
None
5
2018-05-21
2013-12-08
No

This options is useful when you want you use batching not to hammer the server too often with single log events, but you don't want to leave incomplete batches unsent in the client (web browser) for too long.

I implemented it at https://github.com/prantlf/log4javascript/tree/send-all-on-timer. If you find this feature useful too, I'd be happy to contribute it to your project. Thanks!

sendAllOnTimer // false by default
appender.setSendAllOnTimer(true);
1 Attachments

Discussion

  • catherine

    catherine - 2018-05-18

    How can I add this to my ajax appender?

     
  • Ferdinand Prantl

    Yes, you can. See the documentation for sendAllOnTimer at https://rawgit.com/prantlf/log4javascript/combined/docs/manual.html.

    For example:

    appender.setTimed(true)
    appender.setBatchSize(10)
    appender.setTimerInterval(1000)
    appender.setSendAllOnTimer(true)
    appender.setSendAllOnUnload(true)
    appender.setWaitForResponse(false)

     
  • catherine

    catherine - 2018-05-21

    Thanks for the quick response. All links are showing 404. Period is added to the link address. Please check

     
  • Ferdinand Prantl

    You're welcome.

    Including the dots in URLs appears to be a bug in sourcefoprge discussion implementation. just delete the dot at the end of the URL and reload the browser window as a workaround.

     

    Last edit: Ferdinand Prantl 2018-05-21

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.