我在日志中获得的堆栈跟踪如下所示:
[2015-01-28 00:33:12] local.ERROR: exception 'ErrorException' with message 'preg_replace(): Parameter mismatch, pattern is a string while replacement is an array' in /vagrant/vendor/laravel/framework/src/Illuminate/Support/helpers.php:900
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleError(2, 'preg_replace():...', '/vagrant/vendor...', 900, Array)
#1 /vagrant/vendor/laravel/framework/src/Illuminate/Support/helpers.php(900): preg_replace('/\\?/', Array, 'update `company...', 1)
#2 /vagrant/vendor/laravel/framework/src/Illuminate/Database/QueryException.php(55): str_replace_array('\\?', Array, 'update `company...')
#3 /vagrant/vendor/laravel/framework/src/Illuminate/Database/QueryException.php(37): Illuminate\Database\QueryException->formatMessage('update `company...', Array, Object(ErrorException))
#4 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php(627): Illuminate\Database\QueryException->__construct('update `company...', Array, Object(ErrorException))
#5 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php(581): Illuminate\Database\Connection->runQueryCallback('update `company...', Array, Object(Closure))
#6 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php(394): Illuminate\Database\Connection->run('update `company...', Array, Object(Closure))
#7 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php(339): Illuminate\Database\Connection->affectingStatement('update `company...', Array)
#8 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1911): Illuminate\Database\Connection->update('update `company...', Array)
#9 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(316): Illuminate\Database\Query\Builder->update(Array)
#10 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1514): Illuminate\Database\Eloquent\Builder->update(Array)
#11 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1447): Illuminate\Database\Eloquent\Model->performUpdate(Object(Illuminate\Database\Eloquent\Builder), Array)
#12 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php(169): Illuminate\Database\Eloquent\Model->save()
etc...
我想要的是:
a)将跟踪中的每一行扩展为其完整/原始消息的设置或某些内容(如何查看截断的内容?):
#1 ... preg_replace('/\\?/', Array, 'update `company...', 1)
b)或以其他方式禁用Laravel的堆栈跟踪并只显示plain-old-php堆栈跟踪。我打开了这些xdebug设置,但我看不到变量和转储。
http://xdebug.org/docs/stack_trace
这些是我的xdebug设置:
[XDEBUG]
xdebug.remote_connect_back=1
xdebug.default_enable=1
xdebug.remote_autostart=0
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.var_display_max_depth=5
xdebug.var_display_max_children=256
xdebug.var_display_max_data=1024
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.dump_globals=1
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
我正在做很多AJAX工作,所以"呐喊"页面对我没有帮助。我希望能够为tail -f
优先保留所有内容。
提前致谢。