Skip to content

Commit

Permalink
refactor: use slog.Default()
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Sep 27, 2024
1 parent f6f092f commit 111f5bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/crawler/crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func NewCrawler(opt Option) Crawler {
}
}
client.ErrorHandler = func(resp *http.Response, err error, numTries int) (*http.Response, error) {
logger := &slog.Logger{}
logger := slog.Default()
if resp != nil {
logger = slog.With(slog.String("url", resp.Request.URL.String()), slog.Int("status_code", resp.StatusCode),
slog.Int("num_tries", numTries))
Expand Down

0 comments on commit 111f5bb

Please sign in to comment.