go-spatial / tegola

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

feat: expose SetLogLevel in cli #834

Closed iwpnd closed 2 years ago

iwpnd commented 2 years ago

Allow user to set a desired log level on startup with --log-level Level. Omitting the flag results in the default INFO

Hey 👋

I got to one of my proposition from #831. As options I went for the log levels that @gdey has already set - all I did is exposing SetLogLevel in the root.

Let me know if you prefer those levels for the flag instead:

very-verbose = TRACE
verbose = DEBUG
default = INFO
quiet = WARN
silent = ERROR

Where do the docs live actually? 🤔

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 62aaf7955-PR-834


Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/tegola/cmd/root.go 3 26 11.54%
<!-- Total: 3 26 11.54% -->
Totals Coverage Status
Change from base Build ac85a37e4: -0.06%
Covered Lines: 5486
Relevant Lines: 12153

💛 - Coveralls
iwpnd commented 2 years ago

understood. I added the options and labelled the flag as a work in progress.

iwpnd commented 2 years ago

@gdey since this is actually your work and not mine, are you okay with this?

ARolek commented 2 years ago

closed in https://github.com/go-spatial/tegola/commit/e593b4f8518ea2c399834da0048a50261dce9fe5