Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💡 Use proper logging #299

Open
MarcusOtter opened this issue Sep 9, 2022 · 3 comments
Open

💡 Use proper logging #299

MarcusOtter opened this issue Sep 9, 2022 · 3 comments
Labels
help wanted 🙏 Extra attention is needed improvement 💡 Improvement suggestion

Comments

@MarcusOtter
Copy link
Owner

Describe the improvement

One of Needle's shards stopped reconnecting today after 8 days of uptime. Unfortunately we only write errors straight to console right now, so I don't really know what happened. It's about time we invest some time in an actual logging system that saves logs on disk (without having too much of a performance impact).

Logs only need to be stored for like, 48 hours tops. 24h would also be fine. Anything less and I might be asleep when the important error happened.

We should also listen to the following DJS events:

  • debug
  • shardError
  • warn

Problems this improvement solves

We know why errors happen and can act on it.

Alternative solutions

I'd love to hear suggestions on logging libraries and perhaps good (free) remote log services too.

@MarcusOtter MarcusOtter added improvement 💡 Improvement suggestion help wanted 🙏 Extra attention is needed labels Sep 9, 2022
@MarcusOtter MarcusOtter pinned this issue Sep 9, 2022
@MarcusOtter MarcusOtter changed the title 💡 Use some proper logs 💡 Use proper logging Sep 9, 2022
@MarcusOtter
Copy link
Owner Author

On first glance https://github.com/winstonjs/winston seems popular?

@MarcusOtter
Copy link
Owner Author

MarcusOtter commented Sep 9, 2022

https://github.com/pinojs/pino seems like it has less overhead and is more active? And better docs
https://getpino.io/#/docs/benchmarks

@MarcusOtter
Copy link
Owner Author

With 7610168 we listen to the events

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted 🙏 Extra attention is needed improvement 💡 Improvement suggestion
Projects
None yet
Development

No branches or pull requests

1 participant