fix(log): fix debugln not spacing args correctly (#2869)
* fix debugln not spacing args correctly * fix tests
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -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
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user