Esempio n. 1
0
 public function testFactory()
 {
     $cfg = array('application' => 'my app', 'facility' => LOG_USER);
     $writer = SyslogWriter::factory($cfg);
     $this->assertTrue($writer instanceof SyslogWriter);
 }
Esempio n. 2
0
    /**
     * @group ZF-8382
     */
    public function testWriteWithFormatter()
    {
        $event = array(
            'message' => 'tottakai',
            'priority' => Logger::ERR
        );

        $writer = SyslogWriter::factory(array());
        $formatter = new SimpleFormatter('%message% (this is a test)');
        $writer->setFormatter($formatter);

        $writer->write($event);
    }