Welcome Guest, Not a member yet? Register   Sign In
log_path to stdout for AWS CloudWatch


I have some problem to catch the log file on my CI3. I might be in a special case but I need php errors to be redirected to standard display output. Is it possible ?

For my project I have docker machines that run on AWS with fargate. In order to retrieve the logs on AWS CloudWatch I need to be able to redirect my logs to standard output. My apache configuration works well I modified the virtualhost like this

ErrorLog / dev / stdout
CustomLog / dev / stdout combined

My apache access logs are showing up in AWS cloudWatch. However, I have no php errors because codeIgniter has its own error display system ... I have tried several methods but I cannot redirect the errors to standard output, will you have any idea?

Quote:$ config ['log_threshold'] = 1;
$ config ['log_path'] = '/ dev / stdout'; // not working

If not, is it possible to deactivate the error handling of codeIgniter?

(This post was last modified: 12-08-2020, 04:04 AM by sammyskills.)

From the docs
Quote:By default, CodeIgniter displays all PHP errors. You might wish to change this behavior once your development is complete. You’ll find the error_reporting() function located at the top of your main index.php file. Disabling error reporting will NOT prevent log files from being written if there are errors.

I'm not sure if you can completely deactivate the error handling of CI, but I'm sure it can be tweaked. See an example from this post.

Theme © iAndrew 2016 - Forum software by © MyBB