Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable storage of full backtrace for each records #467

Closed
shadyvb opened this issue Apr 28, 2014 · 5 comments

Comments

Projects
None yet
4 participants
@shadyvb
Copy link
Contributor

commented Apr 28, 2014

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() ) ) );
}

@shadyvb shadyvb added the enhancement label Apr 28, 2014

@westonruter

This comment has been minimized.

Copy link
Contributor

commented Apr 28, 2014

I think you'd need to use debug_print_backtrace() and do some output buffering to route it to the error log.

@shadyvb

This comment has been minimized.

Copy link
Contributor Author

commented Apr 29, 2014

@westonruter What is the advantage of debug_print_backtrace to debug_backtrace ?

@westonruter

This comment has been minimized.

Copy link
Contributor

commented Apr 29, 2014

debug_print_backtrace() outputs something that is concise and readable. debug_backtrace() outputs the underlying raw data, potentially a huge array.

@fjarrett

This comment has been minimized.

Copy link
Contributor

commented May 21, 2014

+1 for adding this as Stream meta

@lukecarbis

This comment has been minimized.

Copy link
Contributor

commented May 21, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.