Problem with sending logs to Cloudwatch log groups. How to properly config the monolog to send logs to Cloudwatch log group (using path: 'php://stdout') #51262
Unanswered
westacton-ronald
asked this question in
Q&A
Replies: 1 comment
-
@westacton-ronald could you solve it? I am dealing with the same issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I want to inquire about sending logs to the Cloudwatch log group via
path: 'php://stdout'
using monolog.My Setup is the following:
my current and running monolog.yaml is setup with the following:
Problem:
Tried also changing the path to php://stderr but still the same no logs are received.
Troubleshoot:
created a simple PHP script with the following to test if php can do a stdout. Yes, can receive this message from Cloudwatch.
meaning the PHP config is working fine
$stdout = fopen("php://stdout", "w");
fwrite($stdout,"Simple PHP Script to STDOUT:\n");
from Docker container this monolog.yaml config works fine. as it displays the logs to the docker console log without any problem.
also edit the php.ini with
log_errors = On
anderror_log = /dev/stdout
still not working with logging to CloudwatchCan someone, help me with this implementation? Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions