Closed Halimao closed 8 months ago
This PR add support for setting multiple hooks at one time, without multiple times of deep copy (compare to call Hook() multi-times)
Hook()
Also, func (l Logger) Hook(hooks ...Hook) Logger {} is compatible with func (l Logger) Hook(h Hook) Logger {}
func (l Logger) Hook(hooks ...Hook) Logger {}
func (l Logger) Hook(h Hook) Logger {}
This PR add support for setting multiple hooks at one time, without multiple times of deep copy (compare to call
Hook()
multi-times)Also,
func (l Logger) Hook(hooks ...Hook) Logger {}
is compatible withfunc (l Logger) Hook(h Hook) Logger {}