问题
I am working on a web project and implemented StackExchange.Exceptional for server exceptions logging. I am just wondering if I could log my client side exceptions as well through StackExchange.Exceptional.
Is there any way to use this library for client-side exceptions logging?
回答1:
As far as client side logging is concerned there is no mechanism as per my knowledge. Because the developer never maintain any database of stuff on client side. Even if you save exception in client side storage that wont be a centralized approach and how will you be getting back again?
What you can do By client side you can log javascript's specific scenarios/Exceptions via Ajax Calls to your server in the same error logging module that you are using for server error logs and saving those exception you want to log in your database to have their centralized record.
来源:https://stackoverflow.com/questions/43134563/how-to-log-client-side-exceptions-in-stackexchange-exceptional