service: start/stop logs are info, ignored are debug
This commit is contained in:
parent
02022e356a
commit
9364accf1f
|
@ -84,14 +84,14 @@ func (bs *BaseService) Start() (bool, error) {
|
||||||
return false, nil
|
return false, nil
|
||||||
} else {
|
} else {
|
||||||
if bs.log != nil {
|
if bs.log != nil {
|
||||||
bs.log.Notice(Fmt("Starting %v", bs.name), "impl", bs.impl)
|
bs.log.Info(Fmt("Starting %v", bs.name), "impl", bs.impl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err := bs.impl.OnStart()
|
err := bs.impl.OnStart()
|
||||||
return true, err
|
return true, err
|
||||||
} else {
|
} else {
|
||||||
if bs.log != nil {
|
if bs.log != nil {
|
||||||
bs.log.Info(Fmt("Not starting %v -- already started", bs.name), "impl", bs.impl)
|
bs.log.Debug(Fmt("Not starting %v -- already started", bs.name), "impl", bs.impl)
|
||||||
}
|
}
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ func (bs *BaseService) OnStart() error { return nil }
|
||||||
func (bs *BaseService) Stop() bool {
|
func (bs *BaseService) Stop() bool {
|
||||||
if atomic.CompareAndSwapUint32(&bs.stopped, 0, 1) {
|
if atomic.CompareAndSwapUint32(&bs.stopped, 0, 1) {
|
||||||
if bs.log != nil {
|
if bs.log != nil {
|
||||||
bs.log.Notice(Fmt("Stopping %v", bs.name), "impl", bs.impl)
|
bs.log.Info(Fmt("Stopping %v", bs.name), "impl", bs.impl)
|
||||||
}
|
}
|
||||||
bs.impl.OnStop()
|
bs.impl.OnStop()
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue