mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
* poc * linter: fix --------- Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
18 lines
630 B
Go
18 lines
630 B
Go
package log
|
|
|
|
// CustomLogHook is a function type for external log handling. It should return
|
|
// true if the library's internal logging system should be bypassed, or false
|
|
// if the library's internal logging system should be used.
|
|
type CustomLogHook func(header, subLoggerName string, a ...any) (bypassLibraryLogSystem bool)
|
|
|
|
var customLogHook CustomLogHook
|
|
|
|
// SetCustomLogHook sets a custom log hook function that allows the complete
|
|
// bypass of the library's internal logging system. This is useful for
|
|
// implementing custom log handling.
|
|
func SetCustomLogHook(h CustomLogHook) {
|
|
mu.Lock()
|
|
customLogHook = h
|
|
mu.Unlock()
|
|
}
|