rs / zerolog

Zero Allocation JSON Logger
MIT License
10.39k stars 566 forks source link

Refactor: change Hook(h Hook) to Hook(hooks ...Hook) #629

Closed Halimao closed 8 months ago

Halimao commented 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)

Also, func (l Logger) Hook(hooks ...Hook) Logger {} is compatible with func (l Logger) Hook(h Hook) Logger {}