If error is returned from `Save()`, `rck` is nil and
causes nil dereference panic on accessing `TraceFields` when
printing debug logs.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
In these cases, we can just call digest.Encoded(), instead of needing to
play around with removing the prefix.
Signed-off-by: Justin Chadwell <me@jedevc.com>
This adds trace logs to the solver's cache manager to assist debugging
cache misses+hits.
It also replace the LazyStackTrace struct with a function that returns a
stack trace string only if trace level is enabled, an empty string
otherwise. This makes it easier to use with logrus hooks that pass the
fields around to different goroutines without needing to try to "unlazy"
the fields first.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>