Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Is there any codesnipet/sample/component/lib available for javascript exception logging at the client side? i know console logger but that's not what I'm asking for. I'm looking for some implementation with the help of web storage or web SQL. Also having iOS and chrome support

thanks,

share|improve this question

closed as off-topic by gnat, Dan Pichelman, GlenH7, MichaelT, Ozz Sep 23 at 15:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, Dan Pichelman, GlenH7, MichaelT, Ozz
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

The key need here is being able to log to local storage or web sql. There are quite a few existing frameworks out there, many support more intelligent logging to the console with different log levels and the ability to configure for different deployments, some support remote logging via AJAX calls, but I haven't run across any that do precisely what you are looking for.

One of the most prominent and active of these seems to be log4javascript. I have to confess that I haven't used it, but in looking at the code, it could be extended to add an appender for local storage or web sql.

share|improve this answer
1  
debugging via browsers is not a problem... but console.log is not an option for me because I'm developing web app for webview so i don't have the luxury of using any conventional browser. so thought of diving into hmtl5 instead and i implemented exactly what I was asking for by myself. –  afr0 Sep 26 at 6:11
try
{
    throw new Error("hahahaha!");
}
catch (e)
{
    alert(e.message)
}

Is this what you need ?

share|improve this answer
2  
did you read the question? afr0 is "looking for some implementation with the help of web storage or web SQL" - using alert() is even worse than using console.log() (wich is clearly stated as insufficient) because it stops script execution until you close the window instead of just logging error (wich is what a logger should do, nothing more) –  oezi Sep 20 at 10:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.