Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type AppLogger interface {
Debug(message string, fields ...Field)
Fatal(message string, err error, fields ...Field)
With(fields ...Field) AppLogger
Slog() *slog.Logger
}
Comment thread
abergasov marked this conversation as resolved.

// SLogger is an implementation of AppLogger backed by slog.
Expand Down Expand Up @@ -129,6 +130,11 @@ func (l *SLogger) With(fields ...Field) AppLogger {
return &SLogger{logger: l.logger.With(prepareSlogParams(nil, fields)...)}
}

// Slog return native slogger

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the restating comment.

The comment does not document non-obvious behavior. Remove it unless this method has a protocol contract that requires explanation. As per path instructions, comments are only for non-obvious business logic or protocol details.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/logger/logger.go` at line 133, Remove the redundant “Slog return native
slogger” comment near the logger method; leave the method implementation
unchanged unless it has a required protocol contract needing documentation.

Source: Path instructions

Comment thread
abergasov marked this conversation as resolved.
Outdated
func (l *SLogger) Slog() *slog.Logger {
return l.logger
}
Comment thread
abergasov marked this conversation as resolved.

func prepareSlogParams(err error, fields []Field) []any {
params := make([]any, 0, len(fields)+2)
if err != nil {
Expand Down
Loading