github.com/gogf/gf@v1.16.9/frame/g/g_setting.go (about) 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 7 package g 8 9 import ( 10 "github.com/gogf/gf/internal/intlog" 11 "github.com/gogf/gf/net/ghttp" 12 ) 13 14 // SetDebug enables/disables the GoFrame internal logging manually. 15 // Note that this function is not concurrent safe, be aware of the DATA RACE, 16 // which means you should call this function in your boot but not the runtime. 17 func SetDebug(enabled bool) { 18 intlog.SetEnabled(enabled) 19 } 20 21 // SetServerGraceful enables/disables graceful reload feature of http Web Server. 22 // This feature is disabled in default. 23 // Deprecated, use configuration of ghttp.Server for controlling this feature. 24 func SetServerGraceful(enabled bool) { 25 ghttp.SetGraceful(enabled) 26 }