1

We have a PHP server that is running in a container. The logging for PHP-FPM is done by writing to stderr and then kubernetes is forwarding those messages to the appropriate place.

We have some error log messages that have a \n newline character in them.

The result of that is that the error log message is split by new line, with each part being considered a separate log entry, and are also presented in reverse order.

Is there any sensible way of configuring PHP + kuberenetes to have log messages make it through as single entries?

  • How do you determine what is a single log entry? – Michael Hampton Apr 26 '18 at 14:50
  • From the contents of the call to the PHP function \error_log($foo); Whatever the contents of $foo are, that's a single entry. – Danack Apr 26 '18 at 15:05
  • The problem with that is, PHP itself distinguishes them by newlines. – Michael Hampton Apr 26 '18 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.