v0.5: removed system service env, log output format fix

This commit is contained in:
default
2024-08-13 06:00:22 +08:00
parent 85fb637551
commit 23e7d06081
4 changed files with 10 additions and 18 deletions

View File

@@ -32,19 +32,12 @@ func main() {
logrus.SetLevel(logrus.DebugLevel)
}
if common.IsRunningAsService {
logrus.SetFormatter(&logrus.TextFormatter{
DisableColors: true,
DisableTimestamp: true,
DisableSorting: true,
})
} else {
logrus.SetFormatter(&logrus.TextFormatter{
DisableSorting: true,
FullTimestamp: true,
TimestampFormat: "01-02 15:04:05",
})
}
logrus.SetFormatter(&logrus.TextFormatter{
DisableSorting: true,
FullTimestamp: true,
ForceColors: true,
TimestampFormat: "01-02 15:04:05",
})
if args.Command == common.CommandReload {
if err := apiUtils.ReloadServer(); err.IsNotNil() {