Skip to content

Commit

Permalink
remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ineiti committed Feb 28, 2024
1 parent bdd3975 commit ffe6078
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions cli/node/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,12 @@ func (b *CLIBuilder) Build() cli.Application {
}

func (b *CLIBuilder) start(flags cli.Flags) error {
dela.Logger.Info().Msg("Builder.start - 1")
if b.enableSignal {
signal.Notify(b.sigs, syscall.SIGINT, syscall.SIGTERM)

defer signal.Stop(b.sigs)
}

dela.Logger.Info().Msg("Builder.start - 2")
dir := flags.Path("config")
if dir != "" {
err := os.MkdirAll(dir, 0700)
Expand All @@ -191,23 +189,18 @@ func (b *CLIBuilder) start(flags cli.Flags) error {
}
}

dela.Logger.Info().Msg("Builder.start - 3")
daemon, err := b.daemonFactory.DaemonFromContext(flags)
if err != nil {
return xerrors.Errorf("couldn't make daemon: %v", err)
}

dela.Logger.Info().Msg("Builder.start - 4")
for _, controller := range b.inits {
dela.Logger.Info().Msgf("Starting controller %+v", controller)
err = controller.OnStart(flags, b.injector)
if err != nil {
return xerrors.Errorf("couldn't run the controller: %v", err)
}
dela.Logger.Info().Msgf("Done with controller %+v", controller)
}

dela.Logger.Info().Msg("Builder.start - 5")
// Daemon is started after the controllers so that everything has started
// when the daemon is available.
err = daemon.Listen()
Expand All @@ -217,10 +210,8 @@ func (b *CLIBuilder) start(flags cli.Flags) error {

defer daemon.Close()

dela.Logger.Info().Msg("Builder.start - 6")
<-b.sigs
signal.Stop(b.sigs)
dela.Logger.Info().Msg("Builder.start - 7")

// Controllers are stopped in reverse order so that high level components
// are stopped before lower level ones (i.e. stop a service before the
Expand All @@ -231,7 +222,6 @@ func (b *CLIBuilder) start(flags cli.Flags) error {
return xerrors.Errorf("couldn't stop controller: %v", err)
}
}
dela.Logger.Info().Msg("Builder.start - 8")

dela.Logger.Trace().Msg("daemon has been stopped")

Expand Down

0 comments on commit ffe6078

Please sign in to comment.