Show HN: Deadlog – almost drop-in mutex for debugging Go deadlocks
dirteater_ Tuesday, February 10, 2026I've done this same println debugging thing so many times, along with some sed/awk stuff to figure out which call was causing the issue. Now it's a small Go package.
With some `runtime.Callers` I can usually find the spot by just swapping the existing Mutex or RWMutex for this one.
Sometimes I switch the
mu.Lock()
defer mu.Unlock()
with the LockFunc/RLockFunc to get more detail defer mu.LockFunc()()
I almost always initialize it with `deadlog.New(deadlog.WithTrace(1))` and that's plenty.Not the most polished library, but it's not supposed to land in any commit, just a temporary debugging aid. I find it useful.
Summary
The article describes Deadlog, an open-source tool that provides a simple and efficient way to manage and analyze log files. Deadlog offers features such as filtering, highlighting, and exporting log data, making it easier for developers and system administrators to troubleshoot issues and monitor system activity.
14
1
Summary
github.com