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

Refactor logger component #24

Open
howjmay opened this issue Nov 27, 2020 · 2 comments
Open

Refactor logger component #24

howjmay opened this issue Nov 27, 2020 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@howjmay
Copy link
Contributor

howjmay commented Nov 27, 2020

logrus is under maintenance mode which means it is lack of some necessary feature (e.g. stack trace).

Moreover, it would be better to using error object serves as the error description instead of creating error sturct served for different purposes.

The logger library, zap is a library developed by uber can meet the needs I mentioned above. It would be great to introduce it in this project.

@howjmay
Copy link
Contributor Author

howjmay commented Nov 28, 2020

embedding error object in zap would look like the following style

logger.Fatal("logging message", zap.Error(err))

@howjmay howjmay added good first issue Good for newcomers help wanted Extra attention is needed labels Nov 28, 2020
@howjmay
Copy link
Contributor Author

howjmay commented Dec 12, 2020

Refer this for implementing contextLogger with logrus
https://notes.burke.libbey.me/context-and-logging/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant