BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

[FEATURE] Application logging

Open eddiejaoude opened this issue 2 years ago • 3 comments

Description

We need to decide on how and where to log the application logs

Winston is a popular logging library https://www.npmjs.com/package/winston

NextJS recommend https://www.npmjs.com/package/pino

Screenshots

No response

Additional information

No response

eddiejaoude avatar Jan 15 '23 12:01 eddiejaoude

It's great having you contribute to this project

Welcome to the community :nerd_face:

If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.

github-actions[bot] avatar Jan 15 '23 12:01 github-actions[bot]

Winston is cool, but have you had a look at consolajs? I built myself a logger some time ago to streamline the development of my apps, I previously used winston (repo) now I use consola because I find it much better (repo)

gptkrsh avatar Jan 15 '23 12:01 gptkrsh

Thanks for the suggestion 👍 I will take a look.

We also need it to log to a service, so we can have the maintainers view the logs - I will need to do more research

eddiejaoude avatar Jan 16 '23 10:01 eddiejaoude

Related - Can we use a toast message or something similar to show errors? As of now, I see we are using console.log(error) to show errors.

FrozenHearth avatar Jan 16 '23 20:01 FrozenHearth

According to the official docs by Next Js, we can use Pino as the logger for the application's server. This is the example repo - next-pino-logflare-logging-example

image

Or we can have a discussion on the pros and cons of different logging plugins. Can I also work on this issue?

nanthakumaran-s avatar Jan 17 '23 03:01 nanthakumaran-s