Send all pending entries on timed interval in batching mode
Brought to you by:
timdown
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);
How can I add this to my ajax appender?
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)
Thanks for the quick response. All links are showing 404. Period is added to the link address. Please check
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