コード例 #1
0
ファイル: WatchmanTest.php プロジェクト: cocur/watchman
 /**
  * @test
  * @covers Cocur\Watchman\Watchman::watchLogByLevel()
  * @covers Cocur\Watchman\Watchman::runProcess()
  * @expectedException \InvalidArgumentException
  */
 public function watchLogByLevelGetsInvalidLogLevel()
 {
     $this->watchman->watchLogByLevel('invalid', function () {
     });
 }
コード例 #2
0
ファイル: log-level.php プロジェクト: cocur/watchman
<?php

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