add singleton for logging

pull/231/head
Minh Doan 6 years ago
parent ec5c0495c9
commit 4ebb553a50
  1. 1
      internal/utils/singleton.go

@ -34,6 +34,7 @@ func (s *UniqueValidatorID) GetUniqueID() uint32 {
return atomic.AddUint32(&s.uniqueID, 1) return atomic.AddUint32(&s.uniqueID, 1)
} }
// GetLogInstance returns logging singleton.
func GetLogInstance() log.Logger { func GetLogInstance() log.Logger {
onceForLog.Do(func() { onceForLog.Do(func() {
logInstance = log.New() logInstance = log.New()

Loading…
Cancel
Save