EddieHubCommunity / BioDrop

Connect to your audience with a single link. Showcase the content you create and your projects in one place. Make it easier for people to find, follow and subscribe.
https://biodrop.io
MIT License
5.72k stars 3.95k forks source link

[FEATURE] Application logging #3482

Closed eddiejaoude closed 1 year ago

eddiejaoude commented 1 year ago

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

github-actions[bot] commented 1 year ago

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.

gptkrsh commented 1 year ago

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)

eddiejaoude commented 1 year ago

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

FrozenHearth commented 1 year ago

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.

nanthakumaran-s commented 1 year ago

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?