mc4wp_get_debug_log

Creates a new instance of the Debug Log.

Description

(MC4WP_Debug_Log) mc4wp_get_debug_log(); 

Returns (MC4WP_Debug_Log)


Usage

  1. if ( !function_exists( 'mc4wp_get_debug_log' ) ) { 
  2. require_once '/includes/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = mc4wp_get_debug_log(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/functions.php  
  1. function mc4wp_get_debug_log() 
  2. $opts = mc4wp_get_options(); 
  3.  
  4. // get default log file location 
  5. $upload_dir = wp_upload_dir(null, false); 
  6. $file = trailingslashit($upload_dir['basedir']) . 'mc4wp-debug-log.php'; 
  7.  
  8. /** 
  9. * Filters the log file to write to. 
  10. * @param string $file The log file location. Default: /wp-content/uploads/mc4wp-debug.log 
  11. */ 
  12. $file = apply_filters('mc4wp_debug_log_file', $file); 
  13.  
  14. /** 
  15. * Filters the minimum level to log messages. 
  16. * @see MC4WP_Debug_Log 
  17. * @param string|int $level The minimum level of messages which should be logged. 
  18. */ 
  19. $level = apply_filters('mc4wp_debug_log_level', $opts['debug_log_level']); 
  20.  
  21. return new MC4WP_Debug_Log($file, $level);