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. |
Résultat | self |
/** * Tests registering a not callable function. */ public function testInvalidLogCallback() { $this->setExpectedException('\\InvalidArgumentException'); $this->rpc->enableLogging('file.log', 'dummy'); }
/** * Tests setting an empty log file. */ public function testEmptyLogFile() { $this->expectException(\InvalidArgumentException::class); $this->rpc->enableLogging(''); }