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.
information-system/dingdingcallback/util/Log.php

23 lines
440 B
PHP

<?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);
}
}