Skip to content

chaos-mesh/fx-logr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fx-logr

Fx fxevent logr adapter. See https://pkg.go.dev/go.uber.org/fx#WithLogger for more details.

Installation

go get github.com/chaos-mesh/fx-logr

How to use

import (
  "go.uber.org/fx"

  fxlogr "github.com/chaos-mesh/fx-logr"
)

func main() {
  fx.New(
    fx.WithLogger(
      fxlogr.WithLogr(&logger)
    ),
  )
}

License

Licensed under the Apache License, Version 2.0.

This adapter is inspired by the fxevent zap adapter (https://github.com/uber-go/fx/blob/v1.19.2/fxevent/zap.go) and https://github.com/ipfans/fxlogger (zerolog adapter). Thanks for the great work!