Masking the output of sensitive information in logs.

This commit is contained in:
崔士杰 2024-03-29 13:34:54 +08:00 committed by GitHub
parent 1b48aa072d
commit 3ea1d30e62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -325,6 +325,14 @@ func (db *DB) Debug() (tx *DB) {
}) })
} }
// Silent start silent mode
func (db *DB) Silent() (tx *DB) {
tx = db.getInstance()
return tx.Session(&Session{
Logger: db.Logger.LogMode(logger.Silent),
})
}
// Set store value with key into current db instance's context // Set store value with key into current db instance's context
func (db *DB) Set(key string, value interface{}) *DB { func (db *DB) Set(key string, value interface{}) *DB {
tx := db.getInstance() tx := db.getInstance()