mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-26 19:21:44 +00:00
Service log prettify
This commit is contained in:
@ -49,6 +49,8 @@ type Service interface {
|
||||
AfterStop()
|
||||
|
||||
IsRunning() bool
|
||||
|
||||
String() string
|
||||
}
|
||||
|
||||
type BaseService struct {
|
||||
@ -117,6 +119,11 @@ func (bs *BaseService) IsRunning() bool {
|
||||
return atomic.LoadUint32(&bs.started) == 1 && atomic.LoadUint32(&bs.stopped) == 0
|
||||
}
|
||||
|
||||
// Implements Servce
|
||||
func (bs *BaseService) String() string {
|
||||
return bs.name
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
|
||||
type QuitService struct {
|
||||
|
Reference in New Issue
Block a user