We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
可能需要对这类日志输出进行限制,防止无效日志计算
The text was updated successfully, but these errors were encountered:
https://www.yuque.com/aceld/tsgooa/cx01fget6ka3wep1
关了debug开关,再试试看看
@EquentR
Sorry, something went wrong.
试过了,level是2,主要耗时是在debug方法调用前的hex,不是debug本身
嗯,我看了下,如果是消耗在之前的 hex.EncodeToString() 那确实需要改动的范围有点大,大致思考了下,需要动以下几个步骤: 1、给zlog提供获取当前日志级别的方法,比如zlog.Ins().DebugEnabled() 来判断当前配置的Debug级别。 2、梳理所有DebugF() 中有 ``hex.EncodeToString()` 形参的调用地方。 3、将梳理到的范围代码改成如下写法:
hex.EncodeToString()
zlog.Ins().DebugEnabled()
DebugF()
if zlog.Ins().IsDebugEnabled() { dataStr := hex.EncodeToString(request.GetData()) zlog.Ins().DebugF("SendMsgToTaskQueue-->%s", dataStr) }
欢迎和期待有意愿的开发者,优化此问题,提交PR~
No branches or pull requests
可能需要对这类日志输出进行限制,防止无效日志计算
The text was updated successfully, but these errors were encountered: