X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=pkg%2Fxapp%2Fconfig.go;h=647b3ebad4856b648495054f119e7fca28884580;hb=775722c877ef7110cdb4e992f5c216e0e03775c4;hp=c63e32c21db3ea9ce2f346435e1e83a1c98fce58;hpb=2e78e42c5896b61b77ab3a97e45704f6749161b2;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/xapp/config.go b/pkg/xapp/config.go index c63e32c..647b3eb 100755 --- a/pkg/xapp/config.go +++ b/pkg/xapp/config.go @@ -24,6 +24,7 @@ import ( "github.com/fsnotify/fsnotify" "github.com/spf13/viper" "os" + "path/filepath" ) type Configurator struct { @@ -41,8 +42,8 @@ func parseCmd() string { return *fileName } -func LoadConfig() (l Log) { - l = Log{} +func LoadConfig() (l *Log) { + l = NewLogger(filepath.Base(os.Args[0])) viper.SetConfigFile(parseCmd()) if err := viper.ReadInConfig(); err != nil {