think\Log::clear PHP Method

clear() public static method

清空日志信息
public static clear ( ) : void
return void
    public static function clear()
    {
        self::$log = [];
    }

Usage Example

Exemplo n.º 1
0
 public function testWrite()
 {
     Log::init(['type' => 'test']);
     Log::clear();
     $this->assertTrue(Log::write('hello', 'info'));
     $this->assertTrue(Log::write([1, 2, 3], 'log'));
 }