Closed kingkool68 closed 6 years ago
The nginx error log is being monitored but WordPress' built in debug logging functionality would be another place to monitor for errors. To do this we need to modify wp-config.php so WP_DEBUG is enabled by default:
wp-config.php
WP_DEBUG
define('WP_DEBUG', true); define( 'WP_DEBUG_LOG', true ); if ( isset( $_GET['debug'] ) && $_GET['debug'] == '!wr8KCsv9V7%' ) { define( 'WP_DEBUG_DISPLAY', true ); define( 'SAVEQUERIES', true ); } else { define( 'WP_DEBUG_DISPLAY', false ); }
We also need to tell the AWS CloudWatch log monitor of the new log we want to track by appending a new config to /var/awslogs/etc/awslogs.conf
/var/awslogs/etc/awslogs.conf
[/var/www/spiritedmedia.com/htdocs/wp-content/debug.log] datetime_format = %d-%b-%Y %H:%M:%S file = /var/www/spiritedmedia.com/htdocs/wp-content/debug.log buffer_duration = 5000 log_stream_name = spiritedmedia.com initial_position = start_of_file log_group_name = /var/www/spiritedmedia.com/htdocs/wp-content/debug.log
Be sure to stop and start the logging daemon:
sudo service awslogs stop then sudo service awslogs start
sudo service awslogs stop
sudo service awslogs start
The nginx error log is being monitored but WordPress' built in debug logging functionality would be another place to monitor for errors. To do this we need to modify
wp-config.php
soWP_DEBUG
is enabled by default:We also need to tell the AWS CloudWatch log monitor of the new log we want to track by appending a new config to
/var/awslogs/etc/awslogs.conf
Be sure to stop and start the logging daemon:
sudo service awslogs stop
thensudo service awslogs start