think\Log::getLog PHP Method

getLog() public static method

获取日志信息
public static getLog ( string $type = '' ) : array
$type string 信息类型
return array
    public static function getLog($type = '')
    {
        return $type ? self::$log[$type] : self::$log;
    }

Usage Example

Example #1
0
 public function testRecord()
 {
     $record_msg = 'record';
     Log::record($record_msg, 'notice');
     $logs = Log::getLog();
     $this->assertNotFalse(array_search(['type' => 'notice', 'msg' => $record_msg], $logs));
 }
All Usage Examples Of think\Log::getLog