[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

<?php // (C) Copyright Bobbing Wide 2011-2019
if ( !defined( "BWTRACE_INCLUDED" ) ) {
define( "BWTRACE_INCLUDED", "3.0.0" );
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 View on Trac

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-bwtrace – debug trace for WordPress
      Version: 3.2.1
      Deprecated?: No
      API Letters:

      Published: November 1, 2016 | Last updated: November 1, 2016

      Information

      File name: libs/bwtrace.php
      Plugin ref: oik-bwtrace – debug trace for WordPress
      Version: 3.2.1
      Deprecated?: No
      API Letters:

      Recent plugin updates

      sb-chart-block v0.3.0 sb-chart-block v0.3.0 now uses Chartjs v3.1.0. It also delivers two more Colour palettes. ...
      sb-chart-block v0.2.0 sb-chart-block v0.2.0 has been updated for hosting on WordPress.org. The code now uses improved color palette selection using palette.json. ...
      oik-weight-zone-shipping v0.2.4 oik-weight-zone-shipping v0.2.4 contains a fix to calculate a handling fee as a percentage of the total cart cost. ...
      oik-types v2.0.0 oik-types v2.0.0 contains a fix for a problem noted with Gutenberg Navigation blocks. Existing menus were being loaded in the wrong order.  ...
      oik-css v1.2.0 

      Upgrade to oik-css v1.2.0 for PHP 8 support. Tested with WordPress 5.7

       ...

      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: [email protected]

      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-2021. All rights reserved.


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