enableLogging() public method

Turns on logging.
public enableLogging ( string $filename, callable $callback = null ) : self
$filename string Log file path.
$callback callable Function to be called prior to logging a message.
return self
Beispiel #1
0
 /**
  * Tests registering a not callable function.
  */
 public function testInvalidLogCallback()
 {
     $this->setExpectedException('\\InvalidArgumentException');
     $this->rpc->enableLogging('file.log', 'dummy');
 }
Beispiel #2
0
 /**
  * Tests setting an empty log file.
  */
 public function testEmptyLogFile()
 {
     $this->expectException(\InvalidArgumentException::class);
     $this->rpc->enableLogging('');
 }