summaryrefslogtreecommitdiffstats
path: root/log.go
diff options
context:
space:
mode:
Diffstat (limited to 'log.go')
-rw-r--r--log.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/log.go b/log.go
new file mode 100644
index 0000000..3971126
--- /dev/null
+++ b/log.go
@@ -0,0 +1,17 @@
+package exchange
+
+import (
+ "log"
+ "os"
+)
+
+var (
+ lg = log.New(os.Stderr, "git.samanthony.xyz/exchange ", log.LstdFlags)
+ debug bool
+)
+
+func debugf(format string, a ...any) {
+ if debug {
+ lg.Printf(format, a...)
+ }
+}