X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fxapp%2Fxapp.go;h=f778265edee516733e3ef6affa0c93bdac93dda8;hb=refs%2Ftags%2Fv0.8.1;hp=de355fb05165dd9f18b5df328ce6ea9491089e7b;hpb=0ce03386e6dbdb82b88406b22bb91c8cbe18e349;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/xapp/xapp.go b/pkg/xapp/xapp.go index de355fb..f778265 100755 --- a/pkg/xapp/xapp.go +++ b/pkg/xapp/xapp.go @@ -91,13 +91,13 @@ func registerXapp() { for { time.Sleep(5 * time.Second) if !IsHealthProbeReady() { - Logger.Info("xApp is not ready yet, waiting ...") + Logger.Info("Application='%s' is not ready yet, waiting ...", viper.GetString("name")) continue } - Logger.Info("xApp is now up and ready, continue with registration ...") + Logger.Debug("Application='%s' is now up and ready, continue with registration ...", viper.GetString("name")) if err := doRegister(); err == nil { - Logger.Info("xApp registration done, proceeding with startup ...") + Logger.Info("Registration done, proceeding with startup ...") break } } @@ -243,12 +243,15 @@ func init() { } else { Logger.SetLevel(viper.GetInt("logger.level")) } - Logger.SetFormat(0) + + if !viper.IsSet("controls.logger.noFormat") || !viper.GetBool("controls.logger.noFormat") { + Logger.SetFormat(0) + } Resource = NewRouter() Config = Configurator{} Metric = NewMetrics(viper.GetString("metrics.url"), viper.GetString("metrics.namespace"), Resource.router) - Subscription = NewSubscriber(viper.GetString("subscription.host"), viper.GetInt("subscription.timeout")) + Subscription = NewSubscriber(viper.GetString("controls.subscription.host"), viper.GetInt("controls.subscription.timeout")) Sdl = NewSDLClient(viper.GetString("controls.db.namespace")) Rnib = NewRNIBClient() Util = NewUtils()