feat: logs

This commit is contained in:
tbphp
2025-07-08 22:07:29 +08:00
parent b4178cfce1
commit 2126e30f21
2 changed files with 0 additions and 3 deletions

View File

@@ -64,11 +64,9 @@ func NewLeaderService(s store.Store) *LeaderService {
// Start performs an initial leader election and starts the background leadership maintenance loop.
func (s *LeaderService) Start() error {
if s.isSingleNode {
logrus.Info("In single-node mode, leadership is assumed. Skipping election process.")
return nil
}
logrus.WithField("nodeID", s.nodeID).Info("Performing initial leader election...")
if err := s.tryToBeLeader(); err != nil {
return fmt.Errorf("initial leader election failed: %w", err)
}