Jasonette / Jasonette/JASONETTE-iOS

Need better way to debug and log

Open
#31 3 comments 0 reactions 0 assignees View on GitHub
code discussion enhancement help wanted
Dominant language
JavaScript
Stars
5.2k
Forks
347
PR merge metrics
No merged PRs in 30d

Description

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

@seletz added a [JasonLogAction](https://github.com/Jasonette/JASONETTE-iOS/blob/develop/app/Jasonette/JasonLogAction.m) 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:

```json
{
"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

Open the contributing guide

Research direction

Start with app/Jasonette/JasonLogAction.m and inspect the existing error actions referenced by the issue. The issue proposes either a JasonAnalyticsAction or separate analytics extensions, but does not select an approach, identify implementation files, or define what completion should look like.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c
Domain
mobile-dev, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.