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

[refactoring] Replace all deprecated logger methods #685

Open
ldmonster opened this issue Nov 7, 2024 · 0 comments
Open

[refactoring] Replace all deprecated logger methods #685

ldmonster opened this issue Nov 7, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@ldmonster
Copy link
Contributor

Is your feature request related to a problem? Please describe.

We need to replace all deprecated methods to unify code style and clean logger implementation

Describe the solution you'd like to see

Remove staticcheck linter restriction and replace all methods
golangcilint

  # TODO: replace deprecated methods
  # ignore deprecated 
  # https://staticcheck.dev/docs/checks/#SA1019
  staticcheck:
     checks: ["all","-SA1019"]

Use slog Attrs when refactoring methods

// old method
logger.Infof("user with id '%d' and name '%s' created", user.id, user.name)
// refactored method
logger.Info("user created",slog.Int64("id",user.id), slog.String("name",user.name))

Describe alternatives you've considered

Additional context

@raabdullaev raabdullaev added the good first issue Good for newcomers label Nov 20, 2024
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
Projects
None yet
Development

No branches or pull requests

2 participants