Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
This repository was archived by the owner on May 30, 2024. It is now read-only.

How to use other loggers? #196

@rektide

Description

@rektide

Is your feature request related to a problem? Please describe.

All of our systems use the Pino logger. Not particularly important, but it's fast & json oriented. We would like to better integrate Launch Darkly's output into the rest of our system output. Problem points:

  • The lack of JSON throws off some of log-consumer systems
  • We lack vital meta-data such as when errors are happening
    • We could add that meta-data to Winston too but it's not clear to us we can source the same meta-data in both places. Will these two loggers drift if we change our app logger's metadata?
  • When we change log levels in our app, the launch-darkly output log levels don't change
  • We don't use any fancy outputters, it's all to console, but that could be a point of pain for some

Describe the solution you'd like

What do you think the solution is? We don't have a strong opinion on how to go forward.

We are happy to do a good bit of lifting here. Creating a wrapper around Pino that emulates Winston was the first idea we had. But we were daunted that the Winston library does a lot. Just the logging section of the docs is walloping big. Concerning just the logger alone, there are: object logging, streaming, child logging, meta-data, info objects. The list of features feels like it goes on & on. Our enthusiasm for emulating all of a Winston Logger became quite low.

We thought perhaps we could look at the source code to understand how Winston is used, & create a targeted wrapper, ignore the other capabilities. But at present, this would have to be a recurring task: anytime we upgrade the LD node sdk, we'd need to go re-read the entire library, looking for changes for which Winston logger features are being used.

If we could get some kind of assurance about what Winston features are being used, the situation would be much better & we could proceed with confidence & hopefully ideally release some open source helpers for this purpose. Either a promise that consumption of the Winston Logger's feature-set is not going to change (LD pinky swears they will never use streaming & child loggers, for example), or, if things do change, a new major semantic version as though the LD api had a major change would give us confidence that proceeding was worthwhile.

Describe alternatives you've considered

  • Giving up & having a bad experience
  • Begging for a switch to a smaller logging library (unlikely)

Additional context

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