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

[feature] Migrate logrus to slog #258

Open
acald-creator opened this issue Jan 28, 2023 · 6 comments
Open

[feature] Migrate logrus to slog #258

acald-creator opened this issue Jan 28, 2023 · 6 comments
Assignees
Labels
issue/remind Issue progress check issue/willfix This issue will be worked on kind/enhancement Improvement in current feature language/go Golang related

Comments

@acald-creator
Copy link
Contributor

acald-creator commented Jan 28, 2023

UPDATE: slog is currently available in Go 1.21, and we should make the effort to migrate to use slog.

Current Behavior

meshkit uses logrus for custom logging, and we created a custom logger that only returns certain fields such as

  • warn
  • info
  • error
  • debug

But we're lacking on the other fields that logrus has and we're using a mixture of logrus and our custom logger.

meshkit will benefit from having more fields to call from, when utilizing the custom logging tool in meshery. This will help migrate mesheryctl to use the custom logger, instead of calling logrus directly.

For this purpose of tracking the migration, we will be migrating to use slog instead, which is slightly basic but gives us a bit more ability to customize logging and use more fields.

Here are the fields that slog currently supports

  • Info
  • InfoCtx
  • Warn
  • WarnCtx
  • Debug
  • DebugCtx
  • Error
  • ErrorCtx

There is no built-in support for formatting strings, but slog allows us to create our own fields.

Desired Behavior

Opening this issue to track the progress.


Resources

Alternatives / Additional Context

@acald-creator acald-creator added the kind/enhancement Improvement in current feature label Jan 28, 2023
@acald-creator acald-creator self-assigned this Feb 2, 2023
@stale
Copy link

stale bot commented Mar 20, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the issue/stale Issue has not had any activity for an extended period of time label Mar 20, 2023
@stale
Copy link

stale bot commented Mar 30, 2023

This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue.

@stale stale bot closed this as completed Mar 30, 2023
@acald-creator acald-creator reopened this Mar 31, 2023
@leecalcote leecalcote added issue/willfix This issue will be worked on language/go Golang related labels Mar 31, 2023
@stale stale bot removed the issue/stale Issue has not had any activity for an extended period of time label Mar 31, 2023
@acald-creator
Copy link
Contributor Author

bump

@acald-creator
Copy link
Contributor Author

working on the logging part now

@acald-creator acald-creator changed the title [feature] Add more fields to custom logging [feature] Migrate logrus to slog Apr 19, 2023
@sandramsc sandramsc added the issue/remind Issue progress check label Jan 4, 2024
Copy link

github-actions bot commented Jan 4, 2024

Checking in... it has been awhile since we've heard from you on this issue. Are you still working on it? Please let us know and please don't hesitate to contact a MeshMate or any other community member for assistance.


        Be sure to join the community, if you haven't yet and please leave a ⭐ star on the project 😄

@ayushrakesh
Copy link

@acald-creator Is this issue still open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/remind Issue progress check issue/willfix This issue will be worked on kind/enhancement Improvement in current feature language/go Golang related
Projects
None yet
Development

No branches or pull requests

4 participants