think\Log::record PHP Method

record() public static method

记录调试信息
public static record ( mixed $msg, string $type = 'log' ) : void
$msg mixed 调试信息
$type string 信息类型
return void
    public static function record($msg, $type = 'log')
    {
        self::$log[$type][] = $msg;
    }

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::record