Skip to content

feat: allow to use a LogArrayMarshaler as error stacks #720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trim21
Copy link

@trim21 trim21 commented May 9, 2025

This will allow user to marshal error stack like this, without using json marshaler:

{
  "error": "a: raw error",
  "stack": [
    {
      "function": "main.a",
      "file": "./main.go",
      "lino": 23
    },
    {
      "function": "main.main",
      "file": "./main.go",
      "lino": 19
    },
    {
      "function": "runtime.main",
      "file": "runtime/proc.go",
      "lino": 283
    },
    {
      "function": "runtime.goexit",
      "file": "runtime/asm_amd64.s",
      "lino": 1700
    }
  ]
}

@trim21 trim21 changed the title feat: allow to use array as error stack feat: allow to use a LogArrayMarshaler as error stacks May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant