Last active
September 2, 2018 09:37
-
-
Save bUxEE/2ce5454cf681a132133432386376cadd to your computer and use it in GitHub Desktop.
error_log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function elogp($var, $level="", $log="") { | |
$date = date("d-m-Y h:m:s"); | |
$t = debug_backtrace(); | |
$file = $t[0]['file']; | |
$level = $level == "" ? "info" : $level; | |
$log = $log == "" ? ABSPATH."/elogp.log" : $log; | |
$message = "[{$date}] [{$file}] [{$level}] ".print_r($var, true).PHP_EOL; | |
error_log($message, 3, $log); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment