0

I am working on crud api using go-gorm. I want to log the exact query which is being executed on the database when I run the code(like in hibernate).

For example when db.Create(&user) is executed . It should log

INSERT INTO `users` (`name`,`age`,`created_at`) VALUES ("jinzhu", 18, "2020-07-04 11:05:21.775")

What configuration should I do to achieve this ?

Sushant
  • 123
  • 8

0 Answers0