Starting services message uniformity

This commit is contained in:
TeoV
2019-08-27 03:53:28 -04:00
committed by Dan Christian Bogos
parent bee505b278
commit e511a2e110
9 changed files with 58 additions and 58 deletions

View File

@@ -46,7 +46,7 @@ type AttributeService struct {
// ListenAndServe will initialize the service
func (alS *AttributeService) ListenAndServe(exitChan chan bool) (err error) {
utils.Logger.Info("Starting Attribute service")
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.AttributeS))
e := <-exitChan
exitChan <- e // put back for the others listening for shutdown request
return

View File

@@ -48,7 +48,7 @@ type ChargerService struct {
// ListenAndServe will initialize the service
func (cS *ChargerService) ListenAndServe(exitChan chan bool) (err error) {
utils.Logger.Info(fmt.Sprintf("Starting %s", utils.ChargerS))
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.ChargerS))
e := <-exitChan
exitChan <- e
return

View File

@@ -321,6 +321,7 @@ type ResourceService struct {
// Called to start the service
func (rS *ResourceService) ListenAndServe(exitChan chan bool) error {
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.ResourceS))
go rS.runBackup() // start backup loop
e := <-exitChan
exitChan <- e // put back for the others listening for shutdown request

View File

@@ -63,6 +63,7 @@ type StatService struct {
// ListenAndServe loops keeps the service alive
func (sS *StatService) ListenAndServe(exitChan chan bool) error {
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.StatS))
go sS.runBackup() // start backup loop
e := <-exitChan
exitChan <- e // put back for the others listening for shutdown request

View File

@@ -151,7 +151,7 @@ type SupplierService struct {
// ListenAndServe will initialize the service
func (spS *SupplierService) ListenAndServe(exitChan chan bool) error {
utils.Logger.Info("Starting Supplier Service")
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.SupplierS))
e := <-exitChan
exitChan <- e // put back for the others listening for shutdown request
return nil

View File

@@ -139,6 +139,7 @@ type ThresholdService struct {
// Called to start the service
func (tS *ThresholdService) ListenAndServe(exitChan chan bool) error {
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.ThresholdS))
go tS.runBackup() // start backup loop
e := <-exitChan
exitChan <- e // put back for the others listening for shutdown request