Skip to content

A handy function to write log to uploads/debug.log

Notifications You must be signed in to change notification settings

jiteshdhamaniya/wp-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

WP log

A handy function to write log to uploads/debug.log

Installation

Add these to your wp-config.php

define('WP_DEBUG', true); // To enable debugging. Leave things just like this to output errors, warnings, notices to the screen:
define( 'WP_DEBUG_LOG', true ); // To turn on logging
define( 'WP_DEBUG_DISPLAY', false ); // To prevent output of errors, warnings, notices to the screen (which I personally find SUPER annoying):

Add Snippet.php code to your functions.php usually you would append to bottom.

Once done you can now Call

write_log('Debug anything');

And you will see logs in your wp-content/debug.log file.

About

A handy function to write log to uploads/debug.log

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages