1
0

Avoiding of junk in logs.

This commit is contained in:
Alexander Andreev 2024-01-13 04:02:56 +04:00
parent df3376bc69
commit ffb401fd9b
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -75,8 +75,6 @@ func main() {
syssignal := make(chan os.Signal, 1) syssignal := make(chan os.Signal, 1)
signal.Notify(syssignal, os.Interrupt, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP) signal.Notify(syssignal, os.Interrupt, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP)
log.Printf("httpprocprobed is running on \"%s\".", conf.ListenAddress)
for { for {
switch <-syssignal { switch <-syssignal {
case os.Interrupt: case os.Interrupt:
@ -86,7 +84,6 @@ func main() {
if err := srv.Shutdown(context.Background()); err != nil { if err := srv.Shutdown(context.Background()); err != nil {
log.Fatalf("%s\n", err) log.Fatalf("%s\n", err)
} }
log.Println("Server shutted down.")
os.Exit(0) os.Exit(0)
case syscall.SIGHUP: case syscall.SIGHUP:
newconf, err := LoadConfiguration(*configPath) newconf, err := LoadConfiguration(*configPath)
@ -94,7 +91,6 @@ func main() {
log.Fatalf("Failed to reload a list of processes from configuration: %s\n", err) log.Fatalf("Failed to reload a list of processes from configuration: %s\n", err)
} }
conf.Processes = newconf.Processes conf.Processes = newconf.Processes
log.Println("Successfully reloaded a list of watched processes.")
} }
} }
} }