You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
440 B
PHTML
23 lines
440 B
PHTML
6 years ago
|
<?php
|
||
|
|
||
|
class Log
|
||
|
{
|
||
|
public static function i($msg)
|
||
|
{
|
||
|
self::write('I', $msg);
|
||
|
}
|
||
|
|
||
|
public static function e($msg)
|
||
|
{
|
||
|
self::write('E', $msg);
|
||
|
}
|
||
|
|
||
|
private static function write($level, $msg)
|
||
|
{
|
||
|
$filename = DIR_ROOT . "isv.log";
|
||
|
$logFile = fopen($filename, "aw");
|
||
|
fwrite($logFile, $level . "/" . date(" Y-m-d h:i:s") . " " . $msg . "\n");
|
||
|
fclose($logFile);
|
||
|
}
|
||
|
}
|