Skip to content
New issue

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

如何屏蔽openlog中的Debug日志 #3

Open
haodayitiaoyu666 opened this issue Feb 8, 2022 · 3 comments
Open

如何屏蔽openlog中的Debug日志 #3

haodayitiaoyu666 opened this issue Feb 8, 2022 · 3 comments

Comments

@haodayitiaoyu666
Copy link

微服务中对go-chassis有间接依赖,并使用openlog.Debug将日志信息打印到了服务日志中
请问可以像log4j中一样进行设置并屏蔽这些日志吗

@tianxiaoliang
Copy link
Member

log4j怎么做的,请描述下

@haodayitiaoyu666
Copy link
Author

在微服务中的配置文件里配置:
Logger name="xxx" level="off" additivity="false"
屏蔽xxx类下的日志

@tianxiaoliang
Copy link
Member

https://github.com/go-chassis/seclog/blob/52c40864f2408d6e18a6518743ba6842c88f9d10/seclog.go#L29

openlog仅是个接口标准,实际的实现才有这些功能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants