bobbingwide / oik-bwtrace

debug trace for WordPress
https://www.oik-plugins.com/oik-plugins/oik-bwtrace-debug-trace-for-wordpress/
GNU General Public License v2.0
6 stars 1 forks source link

Reduce messages produced by bw_trace_reset() #46

Open bobbingwide opened 8 years ago

bobbingwide commented 8 years ago

In development, there are times when the trace log file is locked. When a new transaction is run and it attempts to reset the trace file it's possible to run into a few problems. It would be nice if the system could cater for the most likely situations without too many complaints.

bobbingwide commented 7 years ago

The few problems mentioned were the mass of messages that could be produced.

Warning: fopen(C:/apache/htdocs/wordpress/bwtraces.loh): failed to open stream: Permission denied in oik-bwtrace\includes\bwtrace.php on line 765

and finally we get

Fatal error: Uncaught Error: Call to undefined function bw_flush() in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\includes\oik-actions.php:343
Stack trace:
#0 C:\apache\htdocs\wordpress\wp-includes\class-wp-hook.php(286): bw_trace_status_report('')
#1 C:\apache\htdocs\wordpress\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 C:\apache\htdocs\wordpress\wp-includes\plugin.php(453): WP_Hook->do_action(Array)
#3 C:\apache\htdocs\wordpress\wp-includes\load.php(679): do_action('shutdown')
#4 [internal function]: shutdown_action_hook()
#5 {main}
  thrown in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\includes\oik-actions.php on line 343
bobbingwide commented 4 years ago

bw_trace_reset() can still be called. But it's old code that should be deprecated or even removed while addressing #49 and #82