@@ -425,7 +425,7 @@ my_autoloader`, i), body)
425425
426426func TestLog_module (t * testing.T ) { testLog (t , & testOptions {}) }
427427func TestLog_worker (t * testing.T ) {
428- testLog (t , & testOptions {workerScript : "log.php" })
428+ testLog (t , & testOptions {workerScript : "log-error_log .php" })
429429}
430430func testLog (t * testing.T , opts * testOptions ) {
431431 logger , logs := observer .New (zapcore .InfoLevel )
@@ -1064,22 +1064,18 @@ func FuzzRequest(f *testing.F) {
10641064
10651065func TestFrankenPHPLog (t * testing.T ) {
10661066 var buf bytes.Buffer
1067- handler := slog .NewTextHandler (& buf , & slog.HandlerOptions {Level : slog .LevelDebug })
1068- logger := slog .New (handler )
10691067
10701068 runTest (t , func (handler func (http.ResponseWriter , * http.Request ), _ * httptest.Server , _ int ) {
1071- body , _ := testGet ("http://example.com/log_to_slog .php" , handler , t )
1069+ body , _ := testGet ("http://example.com/log-frankenphp_log .php" , handler , t )
10721070 assert .Empty (t , body )
10731071 }, & testOptions {
1074- logger : logger ,
1072+ logger : slog . New ( slog . NewTextHandler ( & buf , & slog. HandlerOptions { Level : slog . LevelDebug })) ,
10751073 nbParallelRequests : 1 ,
10761074 nbWorkers : 1 ,
10771075 })
10781076
10791077 logOutput := buf .String ()
10801078
1081- t .Logf ("captured log output: %s" , logOutput )
1082-
10831079 for level , needle := range map [string ]string {
10841080 "debug attrs" : `level=DEBUG msg="some debug message" "key int"=1` ,
10851081 "info attrs" : `level=INFO msg="some info message" "key string"=string` ,
0 commit comments