Skip to content

Commit

Permalink
feat: Add level/severity support (getsentry#258)
Browse files Browse the repository at this point in the history
* Add level/severity support
* Extract logic to a function
* Simplify code change
  • Loading branch information
stevenon1003 authored and kamilogorek committed May 30, 2019
1 parent c977f96 commit 9599e76
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,11 @@ func (client *Client) Capture(packet *Packet, captureTags map[string]string) (ev
packet.Logger = defaultLoggerName
}

// Set Severity if value is provided
if Severity(captureTags["level"]) != "" {
packet.Level = Severity(captureTags["level"])
}

err := packet.Init(projectID)
if err != nil {
ch <- err
Expand Down

0 comments on commit 9599e76

Please sign in to comment.