-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where is the error.log? #212
Comments
Hi, What have you got in your logs? ( Currently I have the following (version 7.0-apache):
Therefore, there might be no file, unless I actually set this variable (currently investigation). Also, you do not need to access the file. You can probably read it by connecting with ssh ( |
@keltik85 In your
Now you'll be able to see any PHP error logs as part of the docker container log stream: docker logs -f your_php_apache_container To display only errors and hide the access log, you can pipe docker logs -f your_php_apache_container >/dev/null To follow only the access log, you can pipe docker logs -f your_php_apache_container 2>/dev/null |
It's cool, but how to get actual log files? |
check that 000-default site is enabled for your apache, so I ran
then i started seeing logs in access.log and error.log |
@povils Container apps shouldn't write log files in the container, as its lifecycle is meant to be "disposable", unless you mount a volume and want them on your file system. This is a core tenet of the 12-factor-app methodology. If you |
@mikesparr Thanks for the answer. I needed log files because I am using Elastic Filebeat which harvests log files and streams that to our ELK |
I believe you enable fluentd and configure logging output. The ephemeral nature of containers is meant to stream logs not write them so you need to capture the stream one layer up, then ship em.
…Sent from my iPhone
On Oct 20, 2017, at 2:51 AM, Povilas Susinskas ***@***.***> wrote:
@mikesparr Thanks for the answer. I needed log files because I am using Elastic Filebeat which harvests log files and streams that to our ELK
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@blueimp thanks, works perfectly! I wonder, why isn't it included into default PHP Docker image.... |
I solved this problem adding next command in dockerfile RUN cp $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini |
This works like a charms, thanks a lot! |
Hi,
I need some advice from more seasoned docker users.
I am extending the official php-image in my Dockerfile like this:
I build the dockerfile with this:
I run the container like this:
I can see the access.log using this:
How can I see the error.log?????
The text was updated successfully, but these errors were encountered: