Loggable is used to helps tracking changes and history of your GORM models.
It creates change_logs
table in your database and writes to all loggable models when they are changed.
- Register plugin using
loggable.Register(db)
- Add
loggable.LoggableModel
to your GORM model - If you want to set user, who makes changes, and place, where it happened, use
loggable.SetUserAndFrom("username", "London")
.