php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73886 Handle access log & error log on Docker
Submitted: 2017-01-07 08:23 UTC Modified: 2017-04-10 19:06 UTC
Votes:7
Avg. Score:4.7 ± 0.5
Reproduced:7 of 7 (100.0%)
Same Version:6 (85.7%)
Same OS:6 (85.7%)
From: tchiot dot ludo at gmail dot com Assigned: bukka (profile)
Status: Assigned Package: FPM related
PHP Version: 7.1.0 OS: Docker
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-01-07 08:23 UTC] tchiot dot ludo at gmail dot com
Description:
------------
On Dockerfile, the official distribution of php have this configuration : 

[global]
error_log = /proc/self/fd/2 

; if we send this to /proc/self/fd/1, it never appears
access.log = /proc/self/fd/2

seems related to this configuration : 

catch_workers_output boolean
Redirect worker stdout and stderr into main error log. If not set, stdout and stderr will be redirected to /dev/null according to FastCGI specs. Default value: no.

With this configuration, we can't really parse log file (or monitor log) because access log & php fpm stdout & error log in not separated.

see dockerfile maintainer response : https://github.com/docker-library/php/issues/358#issuecomment-271033464

So there is 2 issues here : 
- access log won't write to docker special files : /dev/stdout
- fpm main log with catch_workers_output = yes output stdout & stderr on the same log file, maybe we need a new configuration options in order to have workers output error to stderr & fpm master process std*** to std***


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-10 19:06 UTC] bukka@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: bukka
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC