TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Smarter log handling, the case for opportunistic logging

15 点作者 theotown超过 11 年前

3 条评论

bazzargh超过 11 年前
This (logging to a ring buffer) has been done many times - eg <a href="http://www.stefanrufer.ch/snipsnap/space/Virtual+Brain/Java/Debug-Appender" rel="nofollow">http:&#x2F;&#x2F;www.stefanrufer.ch&#x2F;snipsnap&#x2F;space&#x2F;Virtual+Brain&#x2F;Java&#x2F;...</a><p>There&#x27;s even an implementation built right into log4j, 13 years ago, the SMTPAppender: <a href="http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/net/SMTPAppender.java?revision=308876&amp;view=markup" rel="nofollow">http:&#x2F;&#x2F;svn.apache.org&#x2F;viewvc&#x2F;logging&#x2F;log4j&#x2F;trunk&#x2F;src&#x2F;main&#x2F;ja...</a>
bmohlenhoff超过 11 年前
So instead of writing stuff out to disk, the idea is to keep everything in memory forever until something bad happens? Like, for instance, your machine runs out of memory because your debug logging consumed all of it.<p>How is that better?
评论 #6927679 未加载
评论 #6927588 未加载
评论 #6927521 未加载
评论 #6933700 未加载
theotown超过 11 年前
Haha, first pull request activated! <a href="https://github.com/shelajev/opportunistic-logger/pull/1" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;shelajev&#x2F;opportunistic-logger&#x2F;pull&#x2F;1</a>