cmd/ctrld: add more logging details

This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2023-02-01 23:09:01 +07:00
1 parent c82a0e2562
commit 06372031b5
2 files changed
+5

No files matched your search

+3
View File
@@ -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}}
+2
View File
@@ -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
}