Wudong
Wudong

Reputation: 2360

What's the best way to log in Single Page Application

Just want some insight on this.

Currently I'm using console log in an Angular SPA. but obviously this log is only viewable when I develop it. When it is out there in other people's browse, I have no way to see and check.

What library/tools I can use to have this sort of runtime information when the SPA is in beta test, or even in production?

Upvotes: 1

Views: 101

Answers (2)

REAPP3R
REAPP3R

Reputation: 206

As you're using AngularJS, your best option is to use the $log service (which you have to inject into your own controllers, etc.)

Then, there are a few options to get the relevant bits out:

  • Sentry - mostly focused on error/warning reporting, is integrated with AngularJS - good for production
  • Loggly - collects everything, good for staging environments
  • Build your own - if you are feeling brave!

Upvotes: 2

Dimse
Dimse

Reputation: 1506

I think you should take a look a services like:

and others like them, and see what you think fits your scenario best.

Upvotes: 0

Related Questions