Jasonette/JASONETTE-iOS

Need better way to debug and log

Open

#31 geöffnet am 10. Nov. 2016

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (384 Forks)batch import
codediscussionenhancementhelp wanted

Repository-Metriken

Stars
 (5.290 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Currently it's not so easy to debug when something fails.

@seletz added a JasonLogAction so we can call actions like "type": "$log.debug" to see things on the XCode console, and I think that's a great first step.

But still it's hard to debug things when something goes wrong. I can think of a couple of solutions.

One is, maybe implement some sort of JasonAnalyticsAction, which can send messages to whichever analytics service users want specify (like Heap, Sentry, Mixpanel, Google Analytics, etc)

Example:

{
  "type": "$network.request",
  "options": {
    "url": "...",
    "method": "post"
  },
  "success": {
    "type": "$render"
  },
  "error": {
    "type": "$analytics.send",
    "options": {
      "provider": "mixpanel",
      "data": {
        "message": "{{$jason}}"
      }
    }
  }
}

In order for this to be possible, we need to:

  1. Update existing error actions to return meaningful messages.
  2. Write a new analytics class to handle them.

Or another option would be we could create a separate extension class to handle each analytics service.


But anyway, there can be other ways to do this, so feel free to make suggestions. This is really a pain point for a lot of people (especially the people who normally don't use XCode much) and even myself because it's such a hassle to step through each line and find out what's going on.

Contributor Guide