When a particularly long string gets printed to error.log the string gets cut off at the end and "..." is shown (without the quotes) to indicate it's been cut off.
I'm using Nginx with MySQL, PHP and Laravel if that matters. Basically when I print something to the error log like the following:
Code:
error_log(print_r($long_str, TRUE));
If $long_str is long enough it gets cut off. I'm using this for debugging purposes and this worked fine when I was working in Apache so I think it may have something to do with Nginx.
I've tried changing...
Code:
log_errors_max_len = 1024
to
Code:
log_errors_max_len = 60000
in both /etc/php5/cli/php.ini and /etc/php5/fpm/php.ini
But it didn't do anything. After googling around a bit I found:
"There is a hard-coded length limitation on the error messages in the Nginx core. It is 2048 bytes at most, including the trailing newlines and the leading timestamps. You can manually modify this limit by modifying the NGX_MAX_ERROR_STR macro definition in the src/core/ngx_log.h file in the Nginx source tree. If the message size exceeds this limit, the Nginx core will truncate the message text automatically."
I currently have Nginx already installed on my Linode. So that brings me to the question, how can I modify this src/core/ngx_log.h file, as it doesn't seem to be on my Linode, and recompile?