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

Blessed task - reduce number of trace records produced #34

Open bobbingwide opened 8 years ago

bobbingwide commented 8 years ago

This Issue applies to all components that make use of oik-bwtrace APIs. With many different plugins and themes using the APIs the trace file can get very large and cumbersome.

This Blessed task is similar to its namesake in WordPress. It's an ongoing process. After development of new functionality there might be some trace records which don't really need to be issued at the trace level specified.

Options are:

  1. Delete the trace calls
  2. Comment out the trace calls
  3. Set a higher trace level. e.g. increase to BW_TRACE_VERBOSE from BW_TRACE_DEBUG.

For example, a call to bw_trace2() after bw_get_posts() is probably unnecessary since bw_get_posts() already creates trace records.

bobbingwide commented 8 years ago

We also need to change bw_trace() to check the trace level before it calls bw_lazy_trace(). Since this function is in a shared library ( libs/bwtrace.php) some other plugins will also need updating.