powerhouse-inc / switchboard

Open-source API over the document model made to be developer- and analyst-friendly
https://switchboard-boilerplate.vercel.app
GNU Affero General Public License v3.0
3 stars 3 forks source link

Investigate logging libraries #17

Closed LukSteib closed 1 year ago

LukSteib commented 1 year ago

Goal

Research and decide on best logging library

Context

We want to have an advanced logging library in place that allows to do error and performance logging. More input on original login requirement to inform the research:

should be able to toggle it, at least on a module level > to be plugged in to server logging infrastructure later

First library mentioned and that should be part of the investigation: winston

Tasks

KirillDogadin-std commented 1 year ago
valiafetisov commented 1 year ago

As specified in the issue description, main qualities are:

From my side I would add ease of use. But if all of the points are covered by winston, I think we can quickly conclude investigation and jump into adding it to the codebase 🙂

valiafetisov commented 1 year ago

Although there are also Pino and other which seem to be of the compared popularity https://www.highlight.io/blog/nodejs-logging-libraries. Maybe you can add them to the comparison as well?

KirillDogadin-std commented 1 year ago

well, to reiterate the above regarding winston specifically and per your latest point:

Maybe you can add them to the comparison as well?

ok will do

KirillDogadin-std commented 1 year ago

added base param comparison: they're all the same, seem to be equally ez/hard to use winston leads in gh stars, last updated date. With such small set of things we would like to do with the logging lib, i would just choose winston based on these and the "fact" that the documentation there appears to be of high standard.

valiafetisov commented 1 year ago

I find pino to have a bit simpler interface and zero configuration, they also claim it's faster and have easy integration with express that we're using. One other big advantage I see is that pino works on the frontend as well. So I would try it first. Do you see any problem with that?

If you don't have any arguments against it, let's conclude it until you stumble upon something terrible 🙂