Last active
August 29, 2015 14:18
-
-
Save khepin/0f8a822f7d987aedb7b2 to your computer and use it in GitHub Desktop.
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
if (!function_exists('debuglog')) { | |
function debuglog($message) { | |
if (!is_string($message)) { | |
$message = print_r($message, true); | |
} | |
$message .= "\n"; | |
$dir = ROOT . '/../logs/'; | |
if (!is_dir($dir)) { | |
mkdir($dir); | |
} | |
file_put_contents($dir . '/debug.log', $message, FILE_APPEND); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment