php / php/php-src

FPM: error_log entries all on same line

Abierto
#10,890 10 comentarios 3 reacciones 1 asignado Ver en GitHub

@bukka ya está trabajando en esto.

Desde el 10/4/2023.

Feature SAPI: fpm
Lenguaje dominante
C
Estrellas
40.4k
Forks
8.2k
Merge medio
2 d 13 h
PR fusionados (30 d)
96

Descripción

Description

The following code:

<?php
echo 'try err msg on line 1<p>';
error_log("err on line 1");
echo 'try err msg on line 2<p>';
error_log('err on line 2');
echo 'try err msg on line 3<p>';
error_log('err on line 3');
?>

Resulted in this output:

[Mon Mar 20 15:07:40.253904 2023] [proxy_fcgi:error] [pid 122391:tid 140026615572224] [client 129.71.34.33:53261] AH01071: Got error 'PHP message: err on line 1PHP message: err on line 2PHP message: err on line 3'

But I expected something similar to this instead:

[Mon Mar 20 13:25:38.221700 2023] [fcgid:warn] [pid 97183:tid 140026511869696] [client 129.71.34.33:57883] mod_fcgid: stderr: err on line 1
[Mon Mar 20 13:25:38.221753 2023] [fcgid:warn] [pid 97183:tid 140026511869696] [client 129.71.34.33:57883] mod_fcgid: stderr: err on line 2
[Mon Mar 20 13:25:38.221762 2023] [fcgid:warn] [pid 97183:tid 140026511869696] [client 129.71.34.33:57883] mod_fcgid: stderr: err on line 3

If I change back to FCGId I do get the above three individual log entries -- in fact my example above, as you can see, is from FCGId.

Either I am missing a setting in my PHP and/or FPM config (some flush or cache setting?) or FPM is the culprit here :-) If I send three different distinct error messages, each should be standalone and not concatenated together -- again FCGId logs things properly.

PHP Version

PHP 8.2.4

Operating System

No response

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.