log-monitor 基于tail命令一个活动日志监控。
使用示例:
Just remember that when you call the start method, do not forget to call wait method. $reader = new \Jenner\LogMonitor\Reader\Reader('/var/log/messages'); $filter = new Jenner\LogMonitor\Filter\ExceptionFilter(); $notify = new \Jenner\LogMonitor\Notification\EchoNotification(); $process = new \Jenner\LogMonitor\MonitorTask($reader, $filter, $notify); $process->run(); $process->wait();