public function log($priority, $message, array $options = array())
{
$logEntry = array('timestamp' => date($this->timestamp), 'priority' => (int) $priority, 'name' => $this->priorities[$priority], 'message' => (string) $message);
foreach ($this->writers as $writer) {
$writer->writeLog($logEntry, $options);
}
return $this;
}
public function testLog() { $l = new Logger(new File(__DIR__ . '/../tmp/app.log')); $l->log(Logger::EMERG, 'Test log message'); $this->assertTrue(file_exists(__DIR__ . '/../tmp/app.log')); $this->assertGreaterThan(0, filesize(__DIR__ . '/../tmp/app.log')); unlink(__DIR__ . '/../tmp/app.log'); }