Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR replaces Go's standard log package with structured logging using the slog package. The changes add a logger instance to the Handler struct and update all logging statements to use the structured logger instead of the standard library's log.Printf calls.
- Adds structured logging with
slog.Loggerthroughout the handlers package - Updates the
Handlerstruct to include a logger field and modifies the constructor to accept it - Replaces all
log.Printfcalls withh.Logger.Errorcalls for consistent structured logging
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| internal/server/server.go | Removes test logging and passes logger to handler constructor |
| handlers/model.go | Adds logger field to Handler struct and updates constructor signature |
| handlers/handlers.go | Replaces all log.Printf calls with structured logger error calls |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…IClient() instantiation for consistency.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…rviewer into feature/slog
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary
This PR replaces Go's standard log package with structured logging using the slog package. The changes add a logger instance to the Handler struct and update all logging statements to use the structured logger instead of the standard library's log.Printf calls.