cmd/dex: add logging config and serve logger for different modules.

This commit is contained in:
rithu john
2016-11-22 15:35:46 -08:00
parent 79c51f2983
commit 2e22a948cf
20 changed files with 191 additions and 43 deletions

View File

@@ -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 {