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

Add logging library functions under bw_log() #50

Closed bobbingwide closed 4 years ago

bobbingwide commented 7 years ago

Since WordPress doesn't provide it we should add a new shared library ( bw_log or bwtrace_log ) that will implements an always available, always active logging function that MAY also perform tracing or invoke callbacks to find other useful information that will help in problem determination.

The bw_log() function, in libs/oik_boot.php, will invoke bw_lazy_log() if it's available. The parameters will be similar to those for bw_trace2() with the difference being that the $level may be a callable function to invoke.

One callable function will be oik_yourehavingmeon()

bobbingwide commented 6 years ago

This was developed some time ago. I've just noticed that bw_log() can get invoked when oik-bwtrace.php has not been loaded. bw_lazy_log() then fails to find bw_trace_print_r().

bobbingwide commented 4 years ago

I've just noticed that bw_log() can get invoked when oik-bwtrace.php has not been loaded. bw_lazy_log() then fails to find bw_trace_print_r().

This was fixed in a95603d9f4e2d6874dcf109463330109b815f6a9