X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fcontrol%2Fcontrol.go;fp=pkg%2Fcontrol%2Fcontrol.go;h=08000b0505e1c802b5d1b84e15a6aebf8fb7d63d;hb=e1af87f0759201f64804eff5911c4e6c0e859be9;hp=a3d9cdba0599aa947273ea6525ca8cdaab95707c;hpb=0a8051975b2b55aec0e1cecd987e3576018663e5;p=ric-plt%2Fsubmgr.git diff --git a/pkg/control/control.go b/pkg/control/control.go index a3d9cdb..08000b0 100755 --- a/pkg/control/control.go +++ b/pkg/control/control.go @@ -150,7 +150,7 @@ func NewControl() *Control { e2SubsDb: CreateSdl(), restSubsDb: CreateRESTSdl(), Counters: xapp.Metric.RegisterCounterGroup(GetMetricsOpts(), "SUBMGR"), - LoggerLevel: 4, + LoggerLevel: 1, } e2IfState.Init(c) @@ -161,16 +161,13 @@ func NewControl() *Control { xapp.Resource.InjectRoute("/ric/v1/restsubscriptions", c.GetAllRestSubscriptions, "GET") xapp.Resource.InjectRoute("/ric/v1/symptomdata", c.SymptomDataHandler, "GET") - if readSubsFromDb == "false" { - return c + if readSubsFromDb == "true" { + // Read subscriptions from db + c.ReadE2Subscriptions() + c.ReadRESTSubscriptions() } - // Read subscriptions from db - c.ReadE2Subscriptions() - c.ReadRESTSubscriptions() - go xapp.Subscription.Listen(c.RESTSubscriptionHandler, c.RESTQueryHandler, c.RESTSubscriptionDeleteHandler) - return c } @@ -242,6 +239,7 @@ func (c *Control) ReadConfigParameters(f string) { c.LoggerLevel = int(xapp.Logger.GetLevel()) xapp.Logger.Debug("LoggerLevel= %v", c.LoggerLevel) + c.e2ap.SetASN1DebugPrintStatus(c.LoggerLevel) // viper.GetDuration returns nanoseconds e2tSubReqTimeout = viper.GetDuration("controls.e2tSubReqTimeout_ms") * 1000000