mperdeck / jsnlog.js

Tiny JavaScript logging library, simple and well documented. Lots of options to filter logging data.
js.jsnlog.com
Other
130 stars 44 forks source link

JavaScript Error Handling mechanism should cache errors if offline and deliver as soon as client online #49

Closed neooleg closed 6 years ago

neooleg commented 6 years ago

Issue

There is greate feature Javascript Error Handling which automatically catch unhandled errors.

However, the error is lost if user become offline and appeared online even for few seconds.

Solution

The logger should cache errors in offline (or if sending failed) and send them as soon as client become online.

mperdeck commented 6 years ago

Thanks for your suggestion! I implemented this in version 2.25.0. See http://jsnlog.com/Documentation/HowTo/HandlingLostConnection

neooleg commented 6 years ago

Does it use localstorage in case if page will be "refreshed"?

mperdeck commented 6 years ago

No it doesn't. So yes, if the user refreshes the page, the log entries are lost. Thanks for pointing this out. I'll add this to the to-do list.