go-gorm/gorm.io

Log duplication in gen/generator.go

eugenekainos opened this issue · 0 comments

So I'm trying to understand the purpose of the log dupplication within the generator logic

// info logger
func (g *Generator) info(logInfos ...string) {
	for _, l := range logInfos {
		g.db.Logger.Info(context.Background(), l) <-- log once to DB Logger
		log.Println(l) <--  log second time to std Logger
	}
}

When working with a large schema it get's difficult to sifon through the log statements.