Autonomía digital y tecnológica

Código e ideas para una internet distribuida

Linkoteca. Archivo de navegación


//////
// This is a logging function for any debugging task 
// NOTES:  Youy must have the following lines in the wp-config.php file in the root folder, which
//      puts a debug.log text file under the wp-content folder under root
//
//
// define( 'WP_DEBUG', true );
// define( 'WP_DEBUG_DISPLAY', false );
// define( 'WP_DEBUG_LOG', true );
//
// NOTES: install Error Log Viewer Plugin by bestwebsoft to view log from admin menu

// for error logging
if (!function_exists('write_log')) {
    function write_log ( $log ) {
        if ( true === WP_DEBUG ) {
            if ( is_array( $log ) || is_object( $log )) {
                error_log( print_r( $log, true ));
            
            } else {
                error_log( $log );
            }
        }
    }
}

//
//////
Compartir