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