HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
vvvvv
dlg
Go2025–2025
vvvvv / dlg

dlg

Printf-Style Debugging with Zero-Cost in Production Builds

2Distinct people
3Mentions
0Explicit recommenders
165GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Printf-Style Debugging with Zero-Cost in Production Builds

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by 6-hour interval3 dated mentions

Observed mentions: 2025-07-27 18:02:13 UTC to 2025-07-31 18:30:16 UTC.

012025-07-27 18:00:00 UTC to 2025-07-28 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsJul 27, 18:002025-07-28 00:00:00 UTC to 2025-07-28 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-28 06:00:00 UTC to 2025-07-28 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-28 12:00:00 UTC to 2025-07-28 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-28 18:00:00 UTC to 2025-07-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-29 00:00:00 UTC to 2025-07-29 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-29 06:00:00 UTC to 2025-07-29 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-29 12:00:00 UTC to 2025-07-29 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-29 18:00:00 UTC to 2025-07-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJul 29, 18:002025-07-30 00:00:00 UTC to 2025-07-30 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-30 06:00:00 UTC to 2025-07-30 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-30 12:00:00 UTC to 2025-07-30 18:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-07-30 18:00:00 UTC to 2025-07-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-31 00:00:00 UTC to 2025-07-31 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-31 06:00:00 UTC to 2025-07-31 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-31 12:00:00 UTC to 2025-07-31 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-31 18:00:00 UTC to 2025-08-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 31, 18:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jul 27, 18:002025-07-27 18:00:00 UTC2025-07-28 00:00:00 UTC110
Jul 28, 00:002025-07-28 00:00:00 UTC2025-07-28 06:00:00 UTC000
Jul 28, 06:002025-07-28 06:00:00 UTC2025-07-28 12:00:00 UTC000
Jul 28, 12:002025-07-28 12:00:00 UTC2025-07-28 18:00:00 UTC000
Jul 28, 18:002025-07-28 18:00:00 UTC2025-07-29 00:00:00 UTC000
Jul 29, 00:002025-07-29 00:00:00 UTC2025-07-29 06:00:00 UTC000
Jul 29, 06:002025-07-29 06:00:00 UTC2025-07-29 12:00:00 UTC000
Jul 29, 12:002025-07-29 12:00:00 UTC2025-07-29 18:00:00 UTC000
Jul 29, 18:002025-07-29 18:00:00 UTC2025-07-30 00:00:00 UTC000
Jul 30, 00:002025-07-30 00:00:00 UTC2025-07-30 06:00:00 UTC000
Jul 30, 06:002025-07-30 06:00:00 UTC2025-07-30 12:00:00 UTC000
Jul 30, 12:002025-07-30 12:00:00 UTC2025-07-30 18:00:00 UTC101
Jul 30, 18:002025-07-30 18:00:00 UTC2025-07-31 00:00:00 UTC000
Jul 31, 00:002025-07-31 00:00:00 UTC2025-07-31 06:00:00 UTC000
Jul 31, 06:002025-07-31 06:00:00 UTC2025-07-31 12:00:00 UTC000
Jul 31, 12:002025-07-31 12:00:00 UTC2025-07-31 18:00:00 UTC000
Jul 31, 18:002025-07-31 18:00:00 UTC2025-08-01 00:00:00 UTC101

What Hacker News says

3 sources
It's easy to show that you're right and that code isn't dead so it can't be eliminated: package main import ( "fmt" "github.com/vvvvv/dlg" ) func risky() error { _, err := fmt.Printf("unexpected error\n") return err } func main() { dlg.Printf("something failed: %s", risky()) risky() } prints "unexpected error" twice
In Show HN: Dlg – Zero-cost printf-style debugging for Go

Show HN: Dlg – Zero-cost printf-style debugging for Go

Hey HN, I tend to use printf-style debugging as my primary troubleshooting method and only resort to gdb as a last resort. While I like its ease of use printf debugging isn't without its annoyances, namely removing the print statements once you're done. I used to use trace-level logging from proper logging libraries but adding trace calls in every corner quickly gets out of control and results in an overwhelming amount of output. To scratch my own itch I created dlg - a minimal debugging library that disappears completely from production builds. Its API exposes just a single function, Printf [1]. dlg is optimized for performance in debug builds and, most importantly, when compiled without the dlg build tag, all calls are eliminated by the Go linker as if dlg was never imported. For debug builds it adds optional stack trace generation conf
Read the rest
igurable via environment variables or linker flags. GitHub: https://github.com/vvvvv/dlg Any feedback is much appreciated. [1]: Actually two functions - there's also SetOutput.
64 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.