public function tail()
    {
        $logs = [];
        $i = 1;
        $workersArgs = $this->ResqueStatus->getWorkers();

        foreach ($workersArgs as $workerArgs) {
            if ($workerArgs['log'] != '') {
                $logs[] = $workerArgs['log'];
            }
            if ($workerArgs['Log']['handler'] == 'RotatingFile') {
                $fileInfo = pathinfo($workerArgs['Log']['target']);
                $pattern = $fileInfo['dirname'] . DS . $fileInfo['filename'] . '-*' . (!empty($fileInfo['extension']) ? '.' . $fileInfo['extension'] : '');

                $logs = array_merge($logs, glob($pattern));
            }
        }

        $logs = array_values(array_unique($logs));

        $this->out('<info>' . __d('cake_resque', 'Tailing log file') . '</info>');
        if (empty($logs)) {
            $this->out('    <error>' . __d('cake_resque', 'No log file to tail') . '</error>', 2);

            return false;
        } elseif (count($logs) == 1) {
            $index = 1;
        } else {
            foreach ($logs as $log) {
                $this->out(sprintf('    [%3d] - %s', $i++, $log));
            }

            $index = $this->in(__d('cake_resque', 'Choose a log file to tail') . ':', range(1, $i - 1));
        }

        $this->out('<warning>' . __d('cake_resque', 'Tailing {0}', $logs[ $index - 1 ]) . '</warning>');
        $this->_tail($logs[ $index - 1 ]);
    }