go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.25k stars 193 forks source link

feat: structured logs with uber/zap #865

Closed iwpnd closed 2 years ago

iwpnd commented 2 years ago

Re-opening this as discussed.

As discussed in #831 I added the option to use structured logs with uber/zap while falling back to the currently implemented default if --logger is not specifically used. Log levels conform to the current implementation with the exception of log level TRACE that is not supported by zap. I use Debug as a fall back here.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 2767d7d27-PR-865


Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/log/log.go 5 10 50.0%
cmd/tegola/cmd/root.go 2 18 11.11%
internal/log/zap.go 0 42 0.0%
<!-- Total: 7 70 10.0% -->
Files with Coverage Reduction New Missed Lines %
internal/log/log.go 2 64.75%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 6387c6785: -0.2%
Covered Lines: 5593
Relevant Lines: 12354

💛 - Coveralls
gdey commented 2 years ago

Merged in with a rebase onto master