mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
add web log
This commit is contained in:
@@ -17,13 +17,14 @@ import (
|
||||
)
|
||||
|
||||
type args struct {
|
||||
Port string `arg:"-p" help:"web server port"`
|
||||
Path string `arg:"-d" help:"database path"`
|
||||
LogPath string `arg:"-l" help:"log path"`
|
||||
RDB bool `arg:"-r" help:"start in read-only DB mode"`
|
||||
HttpAuth bool `arg:"-a" help:"http auth on all requests"`
|
||||
DontKill bool `arg:"-k" help:"dont kill server on signal"`
|
||||
UI bool `arg:"-u" help:"run page torrserver in browser"`
|
||||
Port string `arg:"-p" help:"web server port"`
|
||||
Path string `arg:"-d" help:"database path"`
|
||||
LogPath string `arg:"-l" help:"log path"`
|
||||
WebLogPath string `arg:"-w" help:"web log path"`
|
||||
RDB bool `arg:"-r" help:"start in read-only DB mode"`
|
||||
HttpAuth bool `arg:"-a" help:"http auth on all requests"`
|
||||
DontKill bool `arg:"-k" help:"dont kill server on signal"`
|
||||
UI bool `arg:"-u" help:"run page torrserver in browser"`
|
||||
}
|
||||
|
||||
func (args) Version() string {
|
||||
@@ -45,7 +46,7 @@ func main() {
|
||||
|
||||
settings.Path = params.Path
|
||||
settings.HttpAuth = params.HttpAuth
|
||||
log.Init(params.LogPath)
|
||||
log.Init(params.LogPath, params.WebLogPath)
|
||||
|
||||
dnsResolve()
|
||||
Preconfig(params.DontKill)
|
||||
@@ -59,6 +60,7 @@ func main() {
|
||||
|
||||
server.Start(params.Port, params.RDB)
|
||||
log.TLogln(server.WaitServer())
|
||||
log.Close()
|
||||
time.Sleep(time.Second * 3)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user