mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-27 10:45:08 -06:00
e9d04fc1f5
This commit does not change any functionality except it provides callers with a way to provide a logger when instantiating the runtime. Previously, the runtime had hardcoded dependencies on the global logrus logger which made it problematic to test logging behaviour. With this change, the logger can be supplied as a parameter (which allows the caller to mock out the logger in tests...) As part of this change, the dependencies on logrus have been moved out of the runtime package entirely. This commit includes a breaking change to the runtime.NewLoggingHandler function: the function now requires a logger to be supplied. Signed-off-by: Torin Sandall <torinsandall@gmail.com>