Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Mar 8, 2024
1 parent a6ff3fe commit c69fce6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import (
"github.com/ssgreg/journald"
)

// TODO: make toggleable.
var DEBUG bool

func processSentryRequest(w http.ResponseWriter, r *http.Request) {
projectID := chi.URLParam(r, "projectID")
// These can be provided here,
Expand Down Expand Up @@ -97,6 +100,11 @@ func processSentryRequest(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Error parsing event", http.StatusBadRequest)
}

if DEBUG {
fmt.Printf("Received %s event\n", msg_type.Type)
fmt.Println(string(v[2]))
}

journal_metadata := map[string]interface{}{
"SENTRY_KEY": sentry_key,
"SENTRY_VERSION": sentry_version,
Expand Down
2 changes: 1 addition & 1 deletion web.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"
"text/template"

"github.com/go-chi/chi/v5"
"embed"
"github.com/go-chi/chi/v5"
)

//go:embed templates
Expand Down

0 comments on commit c69fce6

Please sign in to comment.