xonecas.io
5119
Lh

lazy-history / files

lazy-history / internal / debug / debug.go

264 bytes
1package debug
2
3import (
4	"log"
5	"os"
6)
7
8var IsDebug = os.Getenv("DEBUG") == "true"
9
10// wrap logging functions with a conditional to check if the debug flag is set
11func Debugf(message string, args ...interface{}) {
12	if IsDebug {
13		log.Printf(message, args...)
14	}
15}