New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration with Revel logger? #44
Comments
Yes, this should works. For those values match this interface could be used as gorm's logger https://github.com/jinzhu/gorm/blob/master/logger.go#L11 But I guess maybe you want to format the outputs like this. https://github.com/jinzhu/gorm/blob/master/logger.go#L22 |
How would I format the outputs with Revel so it formats like this https://github.com/jinzhu/gorm/blob/master/logger.go#L22 ? I am too green with Go right now to work out what to do... |
You could just copy those code to format log messages. But I just improved gorm, so you don't have to format the log by yourself, but do it like this: db.SetLogger(gorm.Logger{revel.TRACE}) |
Looks great, thanks! On Fri, Jan 3, 2014 at 1:32 PM, Jinzhu notifications@github.com wrote:
|
How would I best integrate the Revel logger (http://robfig.github.io/revel/manual/logging.html) with Gorm?
Would this work?
The text was updated successfully, but these errors were encountered: