A Go library that uses static and stack-trace analysis to pinpoint errors and speed up debugging.
Errlog is a Go library designed to drastically reduce debugging time by enhancing error logging with intelligent analysis. It replaces standard `if err != nil` checks with a powerful debugging tool that highlights the exact source of failures, providing immediate context through source code highlighting and pretty stack traces.
Go developers who frequently debug error handling in their applications, particularly those working on projects where identifying the root cause of errors quickly is critical.
Developers choose Errlog because it seamlessly integrates into existing projects without altering team habits, offers configurable logging with a no-op mode for production, and provides actionable insights by detecting and pointing out the specific function call causing an error, even if it's lines away from the check.
Reduce debugging time. Use static & stack-trace analysis to identify the error immediately.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Detects and highlights the exact function call causing an error, even if it's several lines away, as shown in the 'failing line far away' example where it pinpoints the source despite distance.
Offers customizable options like stack traces, source code lines, and integration with external loggers through the Config struct, allowing use with systems like logrus as demonstrated.
Replaces standard `if err != nil` checks with `errlog.Debug(err)`, making adoption easy without disrupting existing codebases or team workflows, as emphasized in the README.
Includes a no-op mode enabled via `errlog.DefaultLogger.Disable(true)`, allowing debugging features to be disabled in production to avoid performance impact.
The README explicitly warns that Config struct definitions may not be up-to-date, requiring developers to check godoc for current features, which can lead to confusion.
Enabling features like stack traces and source printing increases execution time, which could be problematic in development or if accidentally left on in production.
Designed specifically for Go's idiomatic `if err != nil` error handling; it doesn't support alternative methods like panic/recovery or custom error types without adaptation.