nowfound

Dev tools · July 27, 2025

DZ

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…

In plain words

Dlg is a Go debugging library designed for developers who prefer printf-style debugging. It provides a single Printf function that works like standard output but automatically disappears from production builds when compiled without the dlg build tag. The library includes optional stack trace generation configurable through environment variables or linker flags, eliminating the need to manually remove debug statements and reducing output clutter compared to traditional logging libraries.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

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 configurable 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.

More dev tools this month

the category →
  • Dograh592

    The open source VAPI alternative

    Dev tools · 25d ago · dograh.com

  • Meridian530

    Don't let your work go unnoticed. Get promoted!

    Dev tools · 20d ago · meridiona.com

  • x1516

    Lovable for iPhone apps go from idea to App Store

    Dev tools · 11d ago · x1.new

  • Open-source GTM skills for technical founders

    Dev tools · 29d ago · gtmcofounder.com

  • OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.

    Dev tools · 1d ago · opentrailpaper.com

  • Nuphos380

    The AI-Native DevOps Workspace.

    Dev tools · 24d ago · nuphos.ai

Launched alongside, July 2025

the whole month →
  • Clueso1,298

    Create stunning product videos in minutes with AI

    AI · 2025 · clueso.io

  • The 1st Agentic Canvas for building apps visually with AI

    AI · 2025 · trickle.so

  • TB
  • TY

    Today marks ten years, 3653 consecutive days, of running at least one mile every day under the USRSA rules [1]. To celebrate, I built an interactive dashboard that turns a decade of GPX files into charts you can explore. Running has truly changed my life: I've made lifelong friends, explored beautiful places, and more importantly invested into my own health and fitness, which I'm starting to see the positive benefits as I get older. The stack is pretty simple: a NextJS app, with a Postgres database to keep all my running data, and all the stats are pre-computed and cached in Redis, so I…

    Dev tools · 2025 · nodaysoff.run

  • DA

    Made this website as an exercise in vibe-coding and GCP. It was posted about a few times around the internet, on sites like Morning Brew (https://www.morningbrew.com/issues/business-buzzkill), MetaFilter (https://www.metafilter.com/209703/Draw-A-Fish), boingboing.net, etc. I think it's cute! I built a basic CNN trained against penises and swastikas, and then anything that doesn't hit the 63% confidence score gets sent to a mod queue, a vibe-coded fish-tinder…

    Dev tools · 2025 · drawafish.com

  • AppStruct864

    No-code app builder

    Dev tools · 2025 · appstruct.ai