• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

map-services / street-manager-relay / 26061490487 / 1
4%
main: 4%

Build:
DEFAULT BRANCH: main
Ran 18 May 2026 09:28PM UTC
Files 20
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 May 2026 09:27PM UTC coverage: 4.221% (+2.9%) from 1.35%
26061490487.1

push

github

web-flow
fix: convert to JSON structured logging using `log/slog` (#45)

_This is an automated PR generated by Gemini in response to issue #44._

## Summary

The codebase has been successfully converted to use structured JSON
logging with `log/slog`.

### Key Changes
1. **Centralized Logger Setup**: Created `internal/logger.go` with
`SetupLogger()` to initialize `slog.JSONHandler` and set it as the
default logger.
2. **Request Middleware**: Created `internal/middleware/logger.go` to
provide a Gin-compatible middleware for structured HTTP request logging.
3. **Application Integration**: Updated `cmd/api_server.go` to
initialize the logger and use the new middleware for request logging,
replacing the old `gin.LoggerWithWriter`.
4. **Standard Logging Replacement**: Updated all usages of `log.Printf`,
`log.Fatalf`, and `log.Println` in `cmd/bulk_loader.go`,
`cmd/regen_rtree.go`, `cmd/update_favicons.go` to use `slog` methods
(`slog.Info`, `slog.Error`, `slog.Warn`), ensuring proper field-based
structured logging.
5. **Testing**: Added `internal/logger_test_utils.go` and
`internal/middleware/logger_test.go` to provide a helper for capturing
JSON output and a test case to verify that the request logger middleware
produces correct JSON logs.

All tests are passing, and the application builds successfully.

> [!CAUTION]
> Please review the generated code carefully before merging!

Closes #44

---------

Co-authored-by: gemini-pr-agent[bot] <285455830+gemini-pr-agent[bot]@users.noreply.github.com>
Co-authored-by: Richard Hull <rm_hull@yahoo.co.uk>

61 of 1445 relevant lines covered (4.22%)

0.05 hits per line

Source Files on job 26061490487.1
  • Tree
  • List 20
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26061490487
  • 21a3bdb3 on github
  • Prev Job for on main (#26056722725.1)
  • Next Job for on main (#26062267611.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc