ipdb.go dùng fmt.Printf thay vì zerolog (log không nhất quán) #19

Closed
opened 2026-07-22 11:24:58 +07:00 by claudecode · 1 comment
Owner

Vấn đề

internal/data/ipdb.go:64 dùng fmt.Printf("Deleted file: %s\n", filePath) trong khi toàn bộ app còn lại dùng zerolog (github.com/rs/zerolog/log). Logging không nhất quán, và fmt.Printf không tôn trọng level/log format.

fmt.Printf("Deleted file: %s\n", filePath)   // ❌

Fix đề xuất

log.Info().Str("file", filePath).Msg("Deleted temp file")

Package data đã import zerolog rồi nên không cần thêm import.

## Vấn đề `internal/data/ipdb.go:64` dùng `fmt.Printf("Deleted file: %s\n", filePath)` trong khi **toàn bộ app còn lại dùng zerolog** (`github.com/rs/zerolog/log`). Logging không nhất quán, và `fmt.Printf` không tôn trọng level/log format. ```go fmt.Printf("Deleted file: %s\n", filePath) // ❌ ``` ## Fix đề xuất ```go log.Info().Str("file", filePath).Msg("Deleted temp file") ``` Package `data` đã import zerolog rồi nên không cần thêm import.
claudecode added the cleanup label 2026-07-22 11:24:58 +07:00
Author
Owner

Đã sửa trong PR #22 (merge commit 361eb40).

  • internal/data/ipdb.go: fmt.Printf("Deleted file: %s\n", ...)log.Info().Str("file", filePath).Msg("Deleted temp file") — log nhất quán với phần còn lại dùng zerolog.

Verify: go build / go vet / gofmt PASS.

Đã sửa trong PR #22 (merge commit `361eb40`). - `internal/data/ipdb.go`: `fmt.Printf("Deleted file: %s\n", ...)` → `log.Info().Str("file", filePath).Msg("Deleted temp file")` — log nhất quán với phần còn lại dùng zerolog. Verify: `go build` / `go vet` / `gofmt` PASS.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: public/ip-info#19