[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

libs/bwtrace.php


Lines:
1 to 85 of 85
<?php // (C) Copyright Bobbing Wide 2011-2016
if ( !defined( "BWTRACE_INCLUDED" ) ) {
define( "BWTRACE_INCLUDED", "2.0.12" );
define( "BWTRACE_FILE", __FILE__ );


/**
 * Trace library functions
 *
 * Library: bwtrace
 * Provides: bwtrace
 * Type: MU
 *
 */


/** 
 * Constants for bw_trace2's $level parameter
 *
 * - The trace record is produced if the $level passed is greater than or equal to the current tracing level ( $bw_trace_on );
 * - The default value for bw_trace2 is BW_TRACE_ALWAYS
 * - The higher you set the value the more tracing you get.
 * - The testing is NOT (yet) implemented as a bit-mask.
 * - Note: These values are a subset of logging levels in packages such as monolog.
 * - It's not really necessary to have CRITICAL, ALERT or EMERGENCY; ERROR will suffice
 * - See also {@link https://en.wikipedia.org/wiki/Syslog#Severity_levels}
 * 
 */
if ( !defined( 'BW_TRACE_VERBOSE' ) ) { define( 'BW_TRACE_VERBOSE', 64 ); }
if ( !defined( 'BW_TRACE_DEBUG' ) ) { define( 'BW_TRACE_DEBUG', 32 ); }
if ( !defined( 'BW_TRACE_INFO' ) ) { define( 'BW_TRACE_INFO', 16 ); }              // recommended level
if ( !defined( 'BW_TRACE_NOTICE' ) ) { define( 'BW_TRACE_NOTICE', 8 ); }
if ( !defined( 'BW_TRACE_WARNING' ) ) { define( 'BW_TRACE_WARNING', 4 ); }
if ( !defined( 'BW_TRACE_ERROR' ) ) { define( 'BW_TRACE_ERROR', 2 ); }
if ( !defined( 'BW_TRACE_ALWAYS' ) ) { define( 'BW_TRACE_ALWAYS', 0 ); }      // bw_trace2() default


/** 
 * Assume tracing is off
 */
if ( !isset( $bw_trace_on )) {
  if ( defined( 'BW_TRACE_ON' ) ) {
    $bw_trace_on = BW_TRACE_ON;
  } else {
    $bw_trace_on = false;
  }
}


/**
 * Only set trace level if BW_TRACE_LEVEL is defined and it's not already set
 */
if ( !isset( $bw_trace_level )) {
  if ( defined( 'BW_TRACE_LEVEL' ) ) {
    $bw_trace_level = BW_TRACE_LEVEL;
  }
}

if ( !function_exists( "bw_trace" ) ) { 
/* function bw_trace() – Log a simple trace record to the trace log file if tracing is active */
}

if ( !function_exists( "bw_trace2" ) ) { 
/* function bw_trace2() – Trace $value to the trace log file if tracing is active */
}

if ( !function_exists( "bw_backtrace" ) ) { 
/* function bw_backtrace() – Log a debug_backtrace() to the trace log file if tracing is active */
}    


/**
 * Start up tracing from the wp-config file if required
 * 
 * Only do this if the file is available from the current library
 */
if ( defined( 'BW_TRACE_CONFIG_STARTUP' ) && BW_TRACE_CONFIG_STARTUP == true ) {
  $bwtrace_boot = __DIR__ . '/bwtrace_boot.php';
  if ( file_exists( $bwtrace_boot ) ) {
    require_once( $bwtrace_boot );
  }
}
  
} /* end !defined */
 
 View on GitHub

Called by

    Invoked by

      Calls

      1 to 3 of 3
      • bw_trace_config_startup() – Initialise tracing and action counting when WordPress is not yet loaded
      • bw_trace_level() – Determine the required trace level
      • bw_trace_on() – Programmatically enable tracing

      Call hooks

      File name: libs/bwtrace.php
      Plugin ref: oik-batch
      Version: 1.0.0
      Deprecated?: No
      API Letters: B,L,P

      Published: March 14, 2017 | Last updated: March 14, 2017

      Information

      File name: libs/bwtrace.php
      Plugin ref: oik-batch
      Version: 1.0.0
      Deprecated?: No
      API Letters: B,L,P

      Recent plugin updates

      oik-weight-zone-shipping v0.2.13 oik-weight-zone-shipping v0.2.13 has been tested with WooCommerce 10.1.2 and WordPress 6.8.2 ...
      SB Children Block v1.3.0 Upgrade to SB Children Block v1.3.0 for support for PHP 8.3 and PHP 8.4  ...
      oik v4.15.3 Update to oik v4.15.3 for a couple of security fixes. Tested with WordPress 6.8.2 ...
      oik-privacy-policy v1.4.9 Update to oik-privacy-policy v1.4.9 for a security fix. Tested with WordPress 6.8.2 and PHP 8.3 and PHP 8.4 ...
      oik-nivo-slider v1.17.0 oik-nivo-slider v1.17.0 introduces the Nivo slider block - oik-nivo-slider/nivo. ...

      Plugins

      • All Plugins
      • oik base plugin
      • FREE oik plugins
      • WordPress plugins
      • Premium oik plugins

      Themes

      • FREE themes
      • Bespoke themes
      • Premium themes

      Blocks

      • All Blocks
      • Block examples
      • About Blocks

      Shortcodes

      • All Shortcodes
      • Shortcode examples
      • About Shortcodes

      Reference

      • About APIs
      • All APIs
      • All Classes
      • All Files
      • All Hooks

      Support

      • Contact
      • Cookies policy
      • Get API key
      • Privacy
      • Request support
      • Sitemap
      • Stay informed
      • Terms and Conditions
      oik-plugins
      Email: herb@bobbingwide.com

      Weight shipping plugins

      Find out which cart weight shipping plugin you need for your WooCommerce site.
      Which cart weight based plugin do I need?

      Site:  www.oik-plugins.com
      © Copyright oik-plugins 2011-2025. All rights reserved.


      Website designed and developed by Herb Miller of Bobbing Wide
      Proudly powered by WordPress and oik-plugins

      WordPress version: 6.8.3

      Gutenberg version: 21.7.0

      PHP version: 8.2.29