What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi guys! How do you configure spryker in docker to send the log from yves and zed directly to the st
Hi guys! How do you configure spryker in docker to send the log from yves and zed directly to the stdout? They are directly sent to Kibana. I currently have:
$config[LogConstants::LOG_FILE_PATH_YVES] = '<php://stdout>'; $config[LogConstants::LOG_FILE_PATH_ZED] = '<php://stdout>'; $config[LogConstants::EXCEPTION_LOG_FILE_PATH_YVES] = '<php://stderr>'; $config[LogConstants::EXCEPTION_LOG_FILE_PATH_ZED] = '<php://stderr>'; $config[QueueConstants::QUEUE_WORKER_OUTPUT_FILE_NAME] = '<php://stdout>';
And in php-fpm I set:
php_admin_value[error_log] = /proc/self/fd/2
I see the errors in Zed, but not in Yves. Anyone has figured this out?
Comments
-
<php://stdout>
Wonβt work at all. As php-fpm does not support proxying to /proc/self/fd/1.
So only /proc/self/fd/2 and <php://stderr> would work.
0 -
We are using a Filebeat companion container for this.
0 -
we're using a file with symlink like nginx does in their official image:
https://docs.docker.com/config/containers/logging/0 -
@UMZRJAE7M I would like to ask the detailsβ¦
The problem I face is that php-fpm worker cannot access neither /proc/1/fd/2 or /dev/stderr. So symlink does not work.
0 -
@ULYHPR789 good to know - we wanted to switch to symlink because our solution is not that nice
current solution is that we create a fifo file that we use as log destination. In our entrypoint, we use:
mkfifo /var/log/stdout
chmod 666 /var/log/stdoutand in the Spryker config, we use /var/log/stdout as log destination
0 -
How do you create a link?
0 -
well, this solution is without link, that's why I said not so nice
0 -
Ok. How do you redirect /var/log/stdout into docker container output?
0 -
it's a fifo file. If I get it right, it's content is automatically posted into stdout
0 -
ah, we tail it via supervisord
command=tail -f /var/log/stdout
0 -
as I said, not that nice
0 -
Ok. That explains.
0 -
Symlink does not work. As worker has no permission to write into php-fpm process output.
0 -
thx for that information - I wanted to switch to symlink soon
0 -
However
<php://stderr>
works properly. The only thing to do is to set the following for php-fpm poolcatch_workers_output = yes decorate_workers_output = no
0 -
At that point it works properly.
0 -
But console commands are different case. We are trying to find a way to redirect logs spawned by scheduled console commands (e.g. Jenkins) into container output.
0 -
that's still an open point in our setup
0 -
I will notify you about our solution when it becomes mature.
0 -
Maybe helpful link:
https://bugs.php.net/bug.php?id=718800 -
so in php 7.3 <php://stdout> should work
0 -
Yep. Iβve already mentioned the
decorate_workers_output = no
So web requests are good. CLI is still not clear.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 69 Spryker News
- 894 Developer Corner
- 757 Spryker Development
- 83 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 22 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random