Skip to content

Use debug module with stdout/stderr #8

@ibc

Description

@ibc

I always use the Node debug module as follows:

https://github.com/versatica/mediasoup/blob/v3/lib/Logger.js

It provides a constructor to set a sub-namespce (optional) and 3 methods:

  • debug(): prints to stdout.
  • warn(): prints to stderr and adds :WARN: between the "app name" and the sub-namespace.
  • error(): prints to stderr and adds :ERROR: between the "app name" and the sub-namespace.

Interested?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions