mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
wtf fix log time
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
@@ -52,15 +51,16 @@ func Init(path, webpath string) {
|
|||||||
logFile = ff
|
logFile = ff
|
||||||
os.Stdout = ff
|
os.Stdout = ff
|
||||||
os.Stderr = ff
|
os.Stderr = ff
|
||||||
var timeFmt string
|
// var timeFmt string
|
||||||
var ok bool
|
// var ok bool
|
||||||
timeFmt, ok = os.LookupEnv("GO_LOG_TIME_FMT")
|
// timeFmt, ok = os.LookupEnv("GO_LOG_TIME_FMT")
|
||||||
if !ok {
|
// if !ok {
|
||||||
timeFmt = "2006-01-02T15:04:05-0700"
|
// timeFmt = "2006-01-02T15:04:05-0700"
|
||||||
}
|
// }
|
||||||
t := time.Now().Format(timeFmt)
|
// log.SetFlags(log.Lmsgprefix)
|
||||||
log.SetFlags(log.Lmsgprefix)
|
// log.SetPrefix(time.Now().Format(timeFmt) + " TSM ")
|
||||||
log.SetPrefix(t + " TSM ")
|
log.SetFlags(log.LstdFlags | log.LUTC | log.Lmsgprefix)
|
||||||
|
log.SetPrefix("UTC0 ")
|
||||||
log.SetOutput(ff)
|
log.SetOutput(ff)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user