Redefine the extremely wide used Writer interface does not make the best of the experiences for the developer:
type Writer interface {
Printf(string, ...interface{})
}
https://github.com/go-gorm/gorm/blob/master/logger/logger.go#L49-L53
Any plans to have a simpler logger constructor? or even use the most recent structured log from stdlib?
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨
Comment From: ivila
@fulldump You can just redefined the whole logger and replace the default one.
The logger must match the interface defined here: https://github.com/go-gorm/gorm/blob/5e599a07ec6aacd85b7806805908c4a78fa0e5ce/logger/logger.go#L63
You can set your own logger by setting the Logger value in gorm.Config: https://github.com/go-gorm/gorm/blob/5e599a07ec6aacd85b7806805908c4a78fa0e5ce/gorm.go#L30
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨