mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cmd/ctrld: add more logging details
This commit is contained in:
committed by
Cuong Manh Le
parent
c82a0e2562
commit
06372031b5
@@ -536,8 +536,11 @@ func processCDFlags() {
|
||||
}
|
||||
|
||||
if netIface, _ := netInterface(iface); netIface != nil {
|
||||
logger.Debug().Str("iface", netIface.Name).Msg("Restoring DNS for interface")
|
||||
if err := resetDNS(netIface); err != nil {
|
||||
logger.Warn().Err(err).Msg("something went wrong while restoring DNS")
|
||||
} else {
|
||||
logger.Debug().Str("iface", netIface.Name).Msg("Restoring DNS successfully")
|
||||
}
|
||||
}
|
||||
tasks := []task{{s.Uninstall, true}}
|
||||
|
||||
@@ -30,6 +30,7 @@ type prog struct {
|
||||
func (p *prog) Start(s service.Service) error {
|
||||
p.cfg = &cfg
|
||||
go p.run()
|
||||
mainLog.Info().Msg("Service started")
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -170,6 +171,7 @@ func (p *prog) Stop(s service.Service) error {
|
||||
return err
|
||||
}
|
||||
p.resetDNS()
|
||||
mainLog.Info().Msg("Service stopped")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user