Commit 480e29ec authored by kzkzzzz's avatar kzkzzzz

调整conf

parent d046383d
...@@ -42,6 +42,9 @@ func newApp(hs *http.Server, gs *grpc.Server) *kratos.App { ...@@ -42,6 +42,9 @@ func newApp(hs *http.Server, gs *grpc.Server) *kratos.App {
func main() { func main() {
flag.Parse() flag.Parse()
var c conf.Config
conf.LoadFromYaml(flagconf, &c)
logger := log.With(log.NewStdLogger(os.Stdout), logger := log.With(log.NewStdLogger(os.Stdout),
"ts", log.DefaultTimestamp, "ts", log.DefaultTimestamp,
"caller", log.DefaultCaller, "caller", log.DefaultCaller,
...@@ -53,9 +56,6 @@ func main() { ...@@ -53,9 +56,6 @@ func main() {
) )
log.SetLogger(logger) log.SetLogger(logger)
var c conf.Config
conf.LoadFromYaml(flagconf, &c)
app, cleanup, err := wireApp(c.Server, c.Data) app, cleanup, err := wireApp(c.Server, c.Data)
if err != nil { if err != nil {
panic(err) panic(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment