github.com/Laisky/zap@v1.27.0/README.md (about)

     1  fork from: <https://github.com/uber-go/zap> v1.12.0
     2  
     3  
     4  Do not set `time.Now` for low level logs.
     5  
     6  8x faster than origin zap when you emit huge number of low level logs.
     7  (such as you set log level to INFO then emit DEBUG logs)
     8  
     9  ![benchmark](https://s3.laisky.com/uploads/2019/02/zap_benchmark.jpeg)
    10  
    11  Usage: Replace `"github.com/uber-go/zap"` to `"github.com/Laisky/zap"`.
    12  
    13  ## New Features
    14  
    15  ### Hook with fields
    16  
    17  New hook `HooksWithFields` is: `func(e zapcore.Entry, fs []zapcore.Field) (err error)`
    18  
    19  Example:
    20  
    21  * <https://github.com/Laisky/go-utils/blob/fc5d8c9f5e419e64d4779758f6666dd60cfa6eb4/logger_test.go#L138>
    22  * <https://github.com/Laisky/go-utils/blob/261a79711965d859e6292183b50084e3ab881a12/logger.go#L312>