Enable storage of full backtrace for each records
shadyvb opened this issue · comments
Reference: http://wordpress.org/support/topic/timestamp-setting-was-updated
Having a filterable value, that when filtered to true
would store full backtrace in each record meta, or in errorlog
( so we don't have to delete those later when we switch this filter off ), or even pass it to a registered callback.
Example, in the end of the log
method of WP_Stream_Log
:
if ( false !== apply_filters( 'wp_stream_debug_backtrace', false ) ) {
error_log( sprintf( "Stream #%d \n%s", $insert_id, implode( "\n", debug_backtrace() ) ) );
}
I think you'd need to use debug_print_backtrace()
and do some output buffering to route it to the error log.
@westonruter What is the advantage of debug_print_backtrace
to debug_backtrace
?
debug_print_backtrace()
outputs something that is concise and readable. debug_backtrace()
outputs the underlying raw data, potentially a huge array.
+1 for adding this as Stream meta
👍