mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
improve package internal/intlog
This commit is contained in:
@ -35,7 +35,10 @@ func init() {
|
||||
// SetEnabled enables/disables the internal logging manually.
|
||||
// Note that this function is not concurrent safe, be aware of the DATA RACE.
|
||||
func SetEnabled(enabled bool) {
|
||||
isGFDebug = enabled
|
||||
// If they're the same, it does not write the <isGFDebug> but only reading operation.
|
||||
if isGFDebug != enabled {
|
||||
isGFDebug = enabled
|
||||
}
|
||||
}
|
||||
|
||||
// IsEnabled checks and returns whether current process is in GF development.
|
||||
|
||||
Reference in New Issue
Block a user