fix(log): fix debugln not spacing args correctly (#2869)

* fix debugln not spacing args correctly

* fix tests
This commit is contained in:
Jo authored and GitHub committed 2026-06-17 20:39:24 +02:00
1 parent 3b3a2b1dcc
commit df4cbc4ce4
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -54,7 +54,7 @@ func TestLogDebugUsesLoggerDebugGate(t *testing.T) {
engine.SetLogger(debugLogger)
require.NoError(t, engine.L.DoString(`yay.log.debug("visible")`))
require.Equal(t, "[DEBUG:lua]visible\n", stdout.String())
require.Equal(t, "[DEBUG:lua] visible\n", stdout.String())
require.Empty(t, stderr.String())
}
@@ -97,6 +97,6 @@ func TestLoadUsesLuaChildLogger(t *testing.T) {
require.NoError(t, err)
t.Cleanup(engine.Close)
require.Equal(t, "[DEBUG:lua]loaded\n", stdout.String())
require.Equal(t, "[DEBUG:lua] loaded\n", stdout.String())
require.Empty(t, stderr.String())
}
+1 -1
View File
@@ -52,7 +52,7 @@ func (l *Logger) Debugln(a ...any) {
return
}
l.Println(l.sprintDebug(a...))
l.Println(append([]any{Bold(Yellow(fmt.Sprintf("[DEBUG:%s]", l.name)))}, a...)...)
}
func (l *Logger) OperationInfoln(a ...any) {