mirror of
1
Fork 0
gotosocial/vendor/codeberg.org/gruf/go-logger/hook.go

14 lines
254 B
Go
Raw Normal View History

2021-11-13 12:29:08 +01:00
package logger
// Hook defines a log Entry modifier
type Hook interface {
Do(*Entry)
}
// HookFunc is a simple adapter to allow functions to satisfy the Hook interface
type HookFunc func(*Entry)
func (hook HookFunc) Do(entry *Entry) {
hook(entry)
}