feat: use cobra and add some command

This commit is contained in:
Noah Hsu
2022-08-07 13:09:59 +08:00
parent 2b5da3ef34
commit 0df3473337
20 changed files with 279 additions and 96 deletions

View File

@ -4,7 +4,7 @@ import (
"log"
"time"
"github.com/alist-org/alist/v3/cmd/args"
"github.com/alist-org/alist/v3/cmd/flags"
"github.com/alist-org/alist/v3/internal/conf"
rotatelogs "github.com/lestrrat-go/file-rotatelogs"
"github.com/sirupsen/logrus"
@ -22,7 +22,7 @@ func init() {
func Log() {
log.SetOutput(logrus.StandardLogger().Out)
if args.Debug || args.Dev {
if flags.Debug || flags.Dev {
logrus.SetLevel(logrus.DebugLevel)
logrus.SetReportCaller(true)
} else {