From 805ddec62ec66e68a5ac345e1e0f571c5a138de4 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 13 Sep 2017 12:24:16 +0900 Subject: [PATCH] ing --- logging.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/logging.go b/logging.go index 7eadcc8..e1834d0 100644 --- a/logging.go +++ b/logging.go @@ -2,8 +2,6 @@ package logging import ( "encoding/json" - "flag" - "log" "git.loafle.net/commons_go/config" @@ -17,16 +15,11 @@ const loggerKey loggerKeyType = iota var Logger *zap.Logger func init() { - configPath := flag.String("config", ".", "The path of config") - flag.Parse() - - log.Printf("logging: config path1[%s]", *configPath) - conf := config.New() conf.SetConfigName("logging") conf.SetConfigType("json") - conf.AddConfigPath(*configPath) - // conf.AddConfigPath("./config") + conf.AddConfigPath(".") + conf.AddConfigPath("./config") err := conf.ReadInConfig() if nil != err { panic(err)