cmd/dex: add logging config and serve logger for different modules.
This commit is contained in:
@@ -2,7 +2,10 @@ package sql
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
)
|
||||
|
||||
func TestMigrate(t *testing.T) {
|
||||
@@ -12,7 +15,13 @@ func TestMigrate(t *testing.T) {
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
c := &conn{db, flavorSQLite3}
|
||||
logger := &logrus.Logger{
|
||||
Out: os.Stderr,
|
||||
Formatter: &logrus.TextFormatter{DisableColors: true},
|
||||
Level: logrus.DebugLevel,
|
||||
}
|
||||
|
||||
c := &conn{db, flavorSQLite3, logger}
|
||||
for _, want := range []int{len(migrations), 0} {
|
||||
got, err := c.migrate()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user