feat : update log import

This commit is contained in:
zhangwenjian committed 2020-07-27 22:33:00 +08:00
1 parent caab6097b8
commit 2b92b100e3
3 files changed
+9 -10

No files matched your search

+2 -2
View File
@@ -3,9 +3,9 @@ package database
import (
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/postgres"
log "github.com/sirupsen/logrus"
"go-admin/global"
"go-admin/tools/config"
"log"
)
type PgSql struct {
@@ -17,7 +17,7 @@ func (e *PgSql) Setup() {
db = new(PgSql)
global.Source = db.GetConnect()
log.Info(global.Source)
log.Println(global.Source)
global.Eloquent, err = db.Open(db.GetDriver(), db.GetConnect())
if err != nil {
log.Fatalf("%s connect error %v", db.GetDriver(), err)