Open dwoznicki opened 1 year ago
Hey
a log-all-requests flag is a red flag for me. If anything this is trace log level.
What's your use case for it? I'm wondering why you think this is more useful than your browsers developer tools that even give you the option to inspect your requests header and payload. With that regard I don't see value in logging every request additionally to the debug view tegola already provides.
Here are a few use cases that have come up for me.
3. Sometimes it's nice to see which tile requests have been cache hits and which have been misses. This hasn't yielded any great debugging value for me yet; it's just been a little interesting.
Each request that Tegola returns a header that tells you if it's a Cache hit or not.
Tegola-Cache
, will be MISS
or HIT
depending on if the Tegola Cache served it or if Tegola generated the tile before serving it. We need to update our Debugging help to expose this knowledge.
There have been a couple times during debugging where I've found it extremely helpful to have the Tegola tile server log all incoming requests, so I'd like to add it as a CLI option.
I'm happy to contribute this feature, but I'd like some input on the preferred implementation method. Personally, when I was looking to see if this was already implemented, I first tried starting the server with
--log-level=DEBUG
, and then--log-level=TRACE
. So my preference would be to addlog.Debug
statements to request handlers, middleware, etc.Adding a
--log-all-requests
flag also seems reasonable.Any thoughts/preferences?