This PR adds json.Marshaler support for the Frame type, to facilitate logging of stack traces in JSON format. The output format is equivalent to fmt.Printf("v+%"), but without newlines or tab characters.
To me, this format seems the most generally useful, but an argument could be made for outputting a JSON object instead (i.e. {"file":"...", "line": XX, "name": "..."}.).
Fixes #196
This PR adds
json.Marshaler
support for theFrame
type, to facilitate logging of stack traces in JSON format. The output format is equivalent tofmt.Printf("v+%")
, but without newlines or tab characters.To me, this format seems the most generally useful, but an argument could be made for outputting a JSON object instead (i.e.
{"file":"...", "line": XX, "name": "..."}
.).