pushbits / server

A simple server for push notifications via Matrix (and a minimalistic alternative to Pushover and Gotify) 🚀📯
https://www.pushbits.io
ISC License
305 stars 18 forks source link

Use more advanced logging framework #43

Closed eikendev closed 2 years ago

eikendev commented 2 years ago

logrus is quite awesome. I think we should use it to visually highlight errors from informational messages.

eikendev commented 2 years ago

@CubicrootXYZ, I see you've been using zap in the past. What's your opinion here?

CubicrootXYZ commented 2 years ago

Yeah, I am using zap in some of my projects and at work too. It is very easy and simple to use. The main goal I try to achieve with it is structured logging that later can be parsed by graylog or other log aggregators. I do not see this as the main goal here.

I quickly checked and it seems like colored log output is not implemented in zap and therefore needs to be done manually. Logrus seems to be able to do this, it also has an extended format where the caller line is shown, very important for me. Logrus seems to be the better option here for me to get better human readable log output.

eikendev commented 2 years ago

Fixed in f839f248b9b561cdc538ff9ee0f81f921a876078.