Last active
August 29, 2015 14:01
-
-
Save eftakhairul/046224f410d8ee424eda to your computer and use it in GitHub Desktop.
This is a simple logger written by me
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 doLog($text, $path = null) | |
{ | |
// open log file | |
$logFileName = empty($path)? "/system_log.text" : $path . "/system_log.text"; | |
$logger = fopen($logFileName, "a") or die("Could not open log file."); | |
//Write the given test with time | |
fwrite($logger, date("d-m-Y, H:i")." - $text\n") or die("Could not write file!"); | |
fclose($logger); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment