Skip to content

Configurable Logging #285

@kareemmahlees

Description

@kareemmahlees

Context

@openpanel/nextjs currently logs operations like the following:

[OpenPanel.dev] identify user {
  profileId: '',
  firstName: ' ',
  properties: { }
}

While this approach is fine, it restrains the user. What if I wanted to forward the logs to a file or customize the log message?

Proposed Solution

Using something like LogTape gives the user full capability of configuring his logger as he needs, including sinks ( i.e exporters ) and formatters.
While this issue takes the Nextjs package as an example, this can be applied to all JS-based SDKs.

Note

I am willing to add this for the Nextjs SDK as my project currently depends on it

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