g_setting.go 609 B

123456789101112131415161718
  1. // Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
  2. //
  3. // This Source Code Form is subject to the terms of the MIT License.
  4. // If a copy of the MIT was not distributed with this file,
  5. // You can obtain one at https://github.com/gogf/gf.
  6. package g
  7. import (
  8. "github.com/gogf/gf/v2/internal/utils"
  9. )
  10. // SetDebug enables/disables the GoFrame internal logging manually.
  11. // Note that this function is not concurrent safe, be aware of the DATA RACE,
  12. // which means you should call this function in your boot but not the runtime.
  13. func SetDebug(enabled bool) {
  14. utils.SetDebugEnabled(enabled)
  15. }