~egtann/migrate

ref: f8bba57067c303761315e2916cc06bc61880b2cd migrate/logger.go -rw-r--r-- 486 bytes
f8bba570 — Evan Tann update module path 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package migrate

import "fmt"

type Logger interface {
	Printf(string, ...interface{})
	Println(...interface{})
}

// StdLogger is a helper type that simply logs to stdout using fmt. Unless you
// want to structure logs or redirect them in some way, this is probably what
// you want to use in migrate.New().
type StdLogger struct{}

func (l StdLogger) Printf(s string, vs ...interface{}) {
	fmt.Printf(s, vs...)
}

func (l StdLogger) Println(vs ...interface{}) {
	fmt.Println(vs...)
}