mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-08 17:25:35 +08:00
18 lines
373 B
PHP
18 lines
373 B
PHP
<?php
|
|
|
|
|
|
namespace Framework;
|
|
|
|
|
|
use Swoole\Coroutine\System;
|
|
|
|
class Logger
|
|
{
|
|
private static function getTimeFormat($type = "I") {
|
|
return "[" . date("Y-m-d H:i:s") . "]\t[" . $type . "]\t";
|
|
}
|
|
|
|
public static function writeSwooleLog($log) {
|
|
System::writeFile(CRASH_DIR . "swoole_error.log", "\n" . self::getTimeFormat() . $log, FILE_APPEND);
|
|
}
|
|
} |