log: allow external definition of log handling (#1561)

* poc

* linter: fix

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
Ryan O'Hara-Reid
2024-07-19 10:10:27 +10:00
committed by GitHub
parent 90fee94c76
commit db59b8540e
3 changed files with 42 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
package log
import "testing"
func TestSetCustomLoghook(t *testing.T) {
t.Parallel()
logHook := func(_ string, _ string, _ ...interface{}) (bypassLibraryLogSystem bool) {
return false
}
SetCustomLogHook(logHook)
}