2020-02-11 02:49:33 -08:00
|
|
|
# Zerolog
|
|
|
|
|
|
|
|
[Zerolog](https://github.com/rs/zerolog) logger implementation for __go-micro__ [meta logger](https://github.com/micro/go-micro/tree/master/logger).
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```go
|
|
|
|
func ExampleWithOut() {
|
2021-01-10 15:34:37 +03:00
|
|
|
logger.DefaultLogger = zerolog.NewLogger(logger.WithOutput(os.Stdout), logger.WithLevel(logger.DebugLevel))
|
2020-02-11 02:49:33 -08:00
|
|
|
|
2021-01-10 15:34:37 +03:00
|
|
|
logger.Infof(logger.InfoLevel, "testing: %s", "Infof")
|
2020-02-11 02:49:33 -08:00
|
|
|
|
|
|
|
// Output:
|
2021-01-10 15:34:37 +03:00
|
|
|
// {"level":"info","message":"testing: Infof"}
|
2020-02-11 02:49:33 -08:00
|
|
|
}
|
|
|
|
```
|