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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Lumber: The logging package to kill if err = nil

5 点作者 Matt-Gleich超过 4 年前

1 comment

geoah超过 4 年前
Interesting idea, thank you for sharing it and for a very nice readme. The package as a logger seems easy to use and with a very pretty output which I do appreciate.<p>I’m not so sure about how well it does in reducing `if err != nil`. Most production systems in my experience will check for the error, log it, and return. Emphasis on return. Even cli tools will return the error to let some form of higher caller to handle the reporting. And almost never you’ll see non main packages fatal.<p>The hook methods are interesting as well but they are more cumbersome than an if and much harder to look at imo.
评论 #25807557 未加载