Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何日志库包含任何限制日志消息频率的方法?
我的意思是假设我有一个等待循环,它会记录“什么都没做”。如何使下一个“没有完成”消息仅在说 1 秒后记录?
我知道我可以自己编程。
大多数日志库都支持过滤器来限制日志频率。
java.util.logging
您必须在代码中管理它,或者您需要编写自定义附加程序(这取决于您使用的日志库)