Skip to content

Structure logging and the capture of Pion errors. #3

@JoTurk

Description

@JoTurk

Provide high-performance structured logging with a standard-library facing API.
For logging I'm torn between:

  1. Slog + ZAP:
  • Pros: rich API surface. high performance. and DX.
  • Cons: extra adapter layer, more abstractions.
  1. Slog + Diy:
  • Pros: simpler. less third party library to worry about.
  • Cons: More work.

Other issue is that Pion uses it's own logging library, there is a proposal to replace it with slog in the future. as of now there is no clear way to capture and consume logs, the lack of the ability to add tracing, but it's a simple task to add this to pion.

Tasks:

  • Define a logging structure and backend to use.
  • Structure log levels and log levels per module.
  • Tracing structure, with clear mapping. the user should be able to trace any error to specific module and function, for example: webrtc errors should be traced to the peer id and the specific room, with all the other logs.
  • Add a capture and tracing API in Pion/logging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions