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

goflow2: use slog instead of logrus #199

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

goflow2: use slog instead of logrus #199

wants to merge 1 commit into from

Conversation

lspgn
Copy link
Member

@lspgn lspgn commented Aug 10, 2023

This removes the logrus dependency as it's in maintenance-only mode.
Haven't used slog before and it's pretty new. Looking for feedbacks.

@lspgn
Copy link
Member Author

lspgn commented Aug 10, 2023

Base one is less fancy without colors. Native JSON rendering is useful.

{"time":"2023-08-09T21:43:07.940616-07:00","level":"INFO","msg":"starting GoFlow2"}
{"time":"2023-08-09T21:43:07.941039-07:00","level":"INFO","msg":"starting collection","scheme":"sflow","hostname":"","port":6343,"count":1}
{"time":"2023-08-09T21:43:07.941242-07:00","level":"INFO","msg":"starting collection","scheme":"netflow","hostname":"","port":2055,"count":1}

{"time":"2023-08-09T21:43:09.525804-07:00","level":"INFO","msg":"receiver closed","scheme":"sflow","hostname":"","port":6343,"count":1}
{"time":"2023-08-09T21:43:09.525828-07:00","level":"INFO","msg":"transporter closed"}
{"time":"2023-08-09T21:43:09.525854-07:00","level":"INFO","msg":"receiver closed","scheme":"netflow","hostname":"","port":2055,"count":1}
{"time":"2023-08-09T21:43:09.52589-07:00","level":"INFO","msg":"closed HTTP server","http":":8080"}

@lspgn lspgn added enhancement New feature or request dependencies Pull requests that update a dependency file labels Aug 10, 2023
@lspgn lspgn force-pushed the goflow2/use-slog branch 2 times, most recently from cb08412 to 1dc6e85 Compare January 6, 2024 09:51
This removes the `logrus` dependency as it's in maintenance-only mode.
@gaby
Copy link

gaby commented Feb 12, 2024

👍 for adding this, logrus is also super slow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants