update log

This commit is contained in:
nikk gitanes
2021-08-23 20:27:17 +03:00
parent ebe547a566
commit 6775ded8ae
6 changed files with 28 additions and 15 deletions

View File

@@ -55,7 +55,7 @@ func main() {
settings.HttpAuth = params.HttpAuth
log.Init(params.LogPath, params.WebLogPath)
fmt.Println("=========== START ===========")
fmt.Println("Build Go version:", runtime.Version())
fmt.Println("TorrServer", version.Version+",", runtime.Version())
if params.HttpAuth {
log.TLogln("Use HTTP Auth file", settings.Path+"/accs.db")
}

View File

@@ -8,6 +8,7 @@ import (
"syscall"
"server/log"
"server/settings"
)
func Preconfig(dkill bool) {
@@ -22,8 +23,10 @@ func Preconfig(dkill bool) {
go func() {
for s := range sigc {
if dkill {
log.TLogln("Signal catched:", s)
log.TLogln("To stop server, close it from web / api")
if (settings.BTsets.EnableDebug || s != syscall.SIGPIPE) {
log.TLogln("Signal catched:", s)
log.TLogln("To stop server, close it from web / api")
}
}
}
}()