render($template, $data); } function q() { static $caterpillar = false; if(!$caterpillar) { $logdir = __DIR__.'/../scripts/logs/'; $caterpillar = new Caterpillar('telegraph', '127.0.0.1', 11300, $logdir); } return $caterpillar; }