views:

207

answers:

2

I'm using getTraceAsString() to get a stack trace but the string is being truncated for some reason.

Example, an exception is thrown and I log the string using:

catch (SoapFault $e) {
error_log( $e->getTraceAsString() )
}

The string thats prints out is:

#0 C:\Somedirectory\Somedirectory\Somedirectory\Somedir\SomeScript.php(10): SoapClient->SoapClient('http://www.ex...')

How can I get the full string to print?

A: 

Try getTrace() It returns an array of strings see if its truncated there as well.

MindStalker
A: 

Will changing the php.ini setting log_errors_max_len help?

Also, please note that messages are truncated only during the output, you still can get the original error message with call to $exception->getMessage()

Gordon
Prior to creating this post I bumped the value of log_errors_max_len from 1024 to 4096. But there was no difference.
User
Regarding getMessage(), I use both getMessage() and getTraceAsString() but they print different things so I need them both.
User