接口非成功打印异常堆栈
- 接口非成功打印异常堆栈 - 支持开关控制是否打印
This commit is contained in:
@ -36,6 +36,7 @@ type HttpHandleConfig struct {
|
||||
RequestIsSuccessField string // 请求处理是否成功的标识
|
||||
ExtensionOutputField string // 扩展信息对外输出字段
|
||||
EnableExtensionOutput bool
|
||||
DisableDebugStackOutput bool // 禁用异常堆栈打印
|
||||
}
|
||||
|
||||
// ConvertDefaultConfig 覆盖默认配置
|
||||
@ -54,7 +55,8 @@ func ConvertDefaultConfig(cfg *HttpHandleConfig) {
|
||||
// Date : 16:55 2024/7/23
|
||||
func GetHttpHandleConfig() *HttpHandleConfig {
|
||||
return &HttpHandleConfig{
|
||||
EnableExtensionOutput: inputHttpHandleConfig.EnableExtensionOutput,
|
||||
EnableExtensionOutput: inputHttpHandleConfig.EnableExtensionOutput,
|
||||
DisableDebugStackOutput: inputHttpHandleConfig.DisableDebugStackOutput,
|
||||
RequestIDField: wrapper.TernaryOperator.String(
|
||||
nil == inputHttpHandleConfig || inputHttpHandleConfig.RequestIDField == "",
|
||||
consts.GinRequestIDField,
|
||||
|
Reference in New Issue
Block a user