改进Log类的getLog方法 支持获取某个类型的日志信息

This commit is contained in:
thinkphp
2016-06-06 18:29:33 +08:00
parent 3baf150ce1
commit 2cb0f1ed4a

View File

@@ -63,12 +63,13 @@ class Log
}
/**
* 获取全部日志信息
* 获取日志信息
* @param string $type 信息类型
* @return array
*/
public static function getLog()
public static function getLog($type = '')
{
return self::$log;
return $type ? self::$log[$type] : self::$log;
}
/**