mirror of
https://github.com/soypat/lneto.git
synced 2026-08-28 10:29:05 +00:00
add tests for TCP and lneto along with TCB control logic
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
//go:build !debugheaplog
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
const HeapAllocDebugging = false
|
||||
|
||||
// LogAttrs is a helper function that is used by all package loggers and that
|
||||
// can be switched out with the `debugheaplog` build tag for a non-allocating
|
||||
// logger that prints out when heap allocations occur.
|
||||
func LogAttrs(l *slog.Logger, level slog.Level, msg string, attrs ...slog.Attr) {
|
||||
if l != nil {
|
||||
l.LogAttrs(context.Background(), level, msg, attrs...)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user