+
Skip to content

efectn/fx-zerolog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zerolog Adapter for Fx

Go Reference

Zerolog adapter for uber-go/fx/fxevent.

Supported Go Versions

  • 1.18

Install

go get -u github.com/efectn/fx-zerolog@latest

Example

import (
    "github.com/rs/zerolog"
    "go.uber.org/fx"
    "github.com/efectn/fx-zerolog"
)

// ...

func main() {
    fx.New(
    	fx.Provide(
    		NewLogger,
    		NewConfig,
    		NewRouter,
    	),
    	fx.Invoke(Listen),

    	WithLogger(
           fxzerolog.Init(),
       ),
    )
}

License

fx-zerolog is licensed under the terms of the GPL-3 License (see LICENSE).

About

Zerolog adapter for uber-go/fx/fxevent.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载