Skip to content

Commit

Permalink
Remove log decoration from workers output
Browse files Browse the repository at this point in the history
As of PHP 7.3 we finally use STDOUT and STDERR properly in our
containers, this disables the '[pool %s] child %d said into %s: \"%s\'
format.

More info:

- php/php-src#2458
- https://bugs.php.net/bug.php?id=71880
- #207
  • Loading branch information
lcobucci authored and tianon committed Oct 16, 2018
1 parent f363b9f commit 87c85e4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions 7.3-rc/alpine3.8/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ RUN set -ex \
echo; \
echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
echo 'catch_workers_output = yes'; \
echo 'decorate_workers_output = no'; \
} | tee php-fpm.d/docker.conf \
&& { \
echo '[global]'; \
Expand Down
1 change: 1 addition & 0 deletions 7.3-rc/stretch/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ RUN set -ex \
echo; \
echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
echo 'catch_workers_output = yes'; \
echo 'decorate_workers_output = no'; \
} | tee php-fpm.d/docker.conf \
&& { \
echo '[global]'; \
Expand Down
1 change: 1 addition & 0 deletions fpm-Dockerfile-block-2
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RUN set -ex \
echo; \
echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
echo 'catch_workers_output = yes'; \
echo 'decorate_workers_output = no'; \
} | tee php-fpm.d/docker.conf \
&& { \
echo '[global]'; \
Expand Down
4 changes: 4 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ for version in "${versions[@]}"; do
# php 5 still needs older ssl
sed -ri 's/libssl-dev/libssl1.0-dev/g' "$version/$suite/$variant/Dockerfile"
fi
if [ "$variant" = 'fpm' -a "$majorVersion" = '5' ] || [ "$variant" = 'fpm' -a "$majorVersion" = '7' -a "$minorVersion" -lt '3' ]; then
# php-fpm "decorate_workers_output" is only available in 7.3+
sed -ri '/decorate_workers_output/d' "$version/$suite/$variant/Dockerfile"
fi

# remove any _extra_ blank lines created by the deletions above
awk '
Expand Down

0 comments on commit 87c85e4

Please sign in to comment.