We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eca3e6a commit 2a39053Copy full SHA for 2a39053
2 files changed
debugo.go
@@ -27,6 +27,7 @@ type Debugger struct {
27
mutex *sync.Mutex
28
}
29
30
+// New creates a new debugger instance
31
func New(namespace string) *Debugger {
32
return newDebugger(namespace)
33
write.go
@@ -15,11 +15,13 @@ type asJSON struct {
15
ElapsedMs int64 `json:"elapsed_ms,omitempty"`
16
17
18
+// Debug logs a message if the debuggers namespace matches
19
func (d *Debugger) Debug(message ...any) *Debugger {
20
d.write(message...)
21
return d
22
23
24
+// Debugf logs a formatted message if the debuggers namespace matches
25
func (d *Debugger) Debugf(format string, message ...any) *Debugger {
26
d.write(fmt.Sprintf(format, message...))
0 commit comments