fix: use utils.Log in some places

This commit is contained in:
Noah Hsu
2022-08-30 16:13:01 +08:00
parent 615e5dd118
commit a6b9dbfbe4
7 changed files with 15 additions and 18 deletions

View File

@ -71,7 +71,7 @@ func InitialSettings() []model.SettingItem {
{Key: conf.ApiUrl, Value: "", Type: conf.TypeString, Group: model.SITE},
{Key: conf.BasePath, Value: "", Type: conf.TypeString, Group: model.SITE},
{Key: conf.SiteTitle, Value: "AList", Type: conf.TypeString, Group: model.SITE},
{Key: conf.Announcement, Value: "https://github.com/alist-org/alist", Type: conf.TypeString, Group: model.SITE},
{Key: conf.Announcement, Value: "### repo\nhttps://github.com/alist-org/alist", Type: conf.TypeText, Group: model.SITE},
{Key: "pagination_type", Value: "all", Type: conf.TypeSelect, Options: "all,pagination,load_more,auto_load_more", Group: model.SITE},
{Key: "default_page_size", Value: "30", Type: conf.TypeNumber, Group: model.SITE},
// style settings

View File

@ -4,9 +4,9 @@ import (
"github.com/alist-org/alist/v3/cmd/flags"
"github.com/alist-org/alist/v3/internal/db"
"github.com/alist-org/alist/v3/internal/model"
"github.com/alist-org/alist/v3/pkg/utils"
"github.com/alist-org/alist/v3/pkg/utils/random"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"gorm.io/gorm"
)
@ -27,7 +27,7 @@ func initUser() {
if err := db.CreateUser(admin); err != nil {
panic(err)
} else {
log.Infof("Successfully created the admin user and the initial password is: %s", admin.Password)
utils.Log.Infof("Successfully created the admin user and the initial password is: %s", admin.Password)
}
} else {
panic(err)