Skip to content

Commit

Permalink
Merge pull request #12 from go-eagle/hotfix/fix_log_init
Browse files Browse the repository at this point in the history
fix: fixed log init
  • Loading branch information
qloog authored Sep 19, 2024
2 parents cb50426 + ddc3e1b commit 8147e5b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/gin-gonic/gin"
eagle "github.com/go-eagle/eagle/pkg/app"
"github.com/go-eagle/eagle/pkg/config"
logger "github.com/go-eagle/eagle/pkg/log"
v "github.com/go-eagle/eagle/pkg/version"
"github.com/spf13/pflag"
_ "go.uber.org/automaxprocs"
Expand Down Expand Up @@ -61,6 +62,8 @@ func main() {
// set global
eagle.Conf = &cfg

logger.Init(logger.WithFilename("app"))

gin.SetMode(cfg.Mode)

// init pprof server
Expand Down
2 changes: 0 additions & 2 deletions cmd/server/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ func InitApp(cfg *eagle.Config) (*eagle.App, func(), error) {
}

func newApp(cfg *eagle.Config, hs *httpSrv.Server, gs *grpc.Server) *eagle.App {
logger.Init(logger.WithFilename("app"))

return eagle.New(
eagle.WithName(cfg.Name),
eagle.WithVersion(cfg.Version),
Expand Down
2 changes: 0 additions & 2 deletions cmd/server/wire_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8147e5b

Please sign in to comment.