Ejemplo n.º 1
0
 /**
  * @test
  * @covers Cocur\Watchman\Watchman::watchLogByLevel()
  * @covers Cocur\Watchman\Watchman::runProcess()
  * @expectedException \InvalidArgumentException
  */
 public function watchLogByLevelGetsInvalidLogLevel()
 {
     $this->watchman->watchLogByLevel('invalid', function () {
     });
 }
Ejemplo n.º 2
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
use Cocur\Watchman\Watchman;
$watchman = new Watchman();
$watchman->watchLogByLevel('debug', function ($message) {
    echo "{$message}\n";
});